Create version packages PR or release #5
Workflow file for this run
This file contains hidden or 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: Create version packages PR or release | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: # Allow manual triggering of the workflow | |
| inputs: | |
| tag: | |
| description: 'Tag to release' | |
| required: true | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - name: Set tag name | |
| id: set-tag | |
| run: echo "TAG_NAME=${{ github.event.release.tag_name || github.event.inputs.tag }}" >> $GITHUB_ENV | |
| - name: Checkout Repo | |
| uses: actions/checkout@v3 | |
| with: | |
| token: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }} | |
| # Use the tag associated with the release | |
| ref: ${{ env.TAG_NAME }} | |
| - name: Setup Node from .nvmrc | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: '.nvmrc' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Publish to NPM | |
| run: npm publish --provenance --tag ${{ env.TAG_NAME }} | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| GITHUB_TOKEN: ${{ secrets.SHOPIFY_GH_ACCESS_TOKEN }} |