v1.6.0 #5
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: Post Release | |
# run after releases are published | |
on: | |
release: | |
types: [released] | |
jobs: | |
npm: | |
name: Publish to NPM | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout ${{ github.event.release.tag_name }} | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
lfs: true | |
- uses: actions/[email protected] | |
with: | |
node-version: 16.17 | |
registry-url: https://registry.npmjs.org | |
- run: corepack enable yarn | |
- run: yarn install --immutable | |
- run: npm publish ./packages/suite | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | |
docker: | |
name: Publish to GHCR | |
runs-on: ubuntu-20.04 | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout ${{ github.event.release.tag_name }} | |
uses: actions/[email protected] | |
with: | |
ref: ${{ github.event.release.tag_name }} | |
lfs: true | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Log in to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Format version | |
id: format_version | |
run: | | |
VERSION=${{ github.event.release.tag_name }} | |
FORMATTED_VERSION=$(echo "$VERSION" | sed 's/^v//') | |
echo "::set-output name=formatted_version::$FORMATTED_VERSION" | |
- name: Build and Push Docker image | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: | | |
ghcr.io/${{ github.repository }}:latest | |
ghcr.io/${{ github.repository }}:${{ steps.format_version.outputs.formatted_version }} |