Publish Release #12
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
app: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
sparse-checkout: | | |
app | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18.x | |
registry-url: "https://registry.npmjs.org" | |
- name: Install dependencies | |
working-directory: app | |
run: npm ci | |
- name: Build package | |
working-directory: app | |
run: npm run build | |
- name: Publish package | |
working-directory: app | |
run: npm publish --access=public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
cms-oauth: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
sparse-checkout: | | |
github-oauth | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: ./github-oauth | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ghcr.io/rickli-cloud/cms-oauth:${{ github.ref_name }} |