Slack GitHub Action v3.0.1 #7
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: Publish | |
| on: | |
| release: | |
| types: | |
| - published | |
| - edited | |
| jobs: | |
| build: | |
| name: Build and tag a new version | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout the current code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: true | |
| ref: ${{ github.event.release.tag_name }} | |
| - name: Configure the runtime node | |
| uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0 | |
| with: | |
| cache: npm | |
| cache-dependency-path: package-lock.json | |
| node-version-file: .nvmrc | |
| - name: Install project dependencies | |
| run: npm ci | |
| - name: Build a production release | |
| run: npm run build | |
| - name: Distribute the latest tagged release | |
| id: tag | |
| uses: teunmooij/github-versioned-release@3edf649c6e5e5e976d43f2584b15bdc8b4c8f0df # v1.2.1 | |
| with: | |
| template: javascript-action | |
| include: | | |
| dist/**/* | |
| cli/**/* | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Create a branch for tagged release | |
| run: | | |
| git fetch origin "$SHA" | |
| git checkout -b "release/$TAG" "$SHA" | |
| git push origin "release/$TAG" | |
| env: | |
| TAG: ${{ github.event.release.tag_name }} | |
| SHA: ${{ steps.tag.outputs.sha }} |