build: pin all actions used (#2328) #1337
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: Open release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| # | |
| # TODO | |
| # - Print versions name to commit, for easier Vercel deployments | |
| # | |
| jobs: | |
| release: | |
| name: Prepare release with Changesets | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Get Token | |
| id: get-token | |
| uses: saleor/saleor-internal-actions/request-vault-token@6a0fa7c073b3857a11d414f25a149065fe5a0fcf # v1.4.0 | |
| with: | |
| vault-url: ${{ secrets.VAULT_URL }} | |
| vault-jwt: ${{ secrets.VAULT_JWT }} | |
| - name: Checkout Repo | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | |
| with: | |
| token: ${{ steps.get-token.outputs.token }} | |
| # Tags are fetched for Changeset to distinguish from new ones while running `changeset tag` | |
| - name: Git fetch tags | |
| run: git fetch --tags origin | |
| - uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0 | |
| with: | |
| run_install: false | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version-file: ".nvmrc" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Create Release Pull Request | |
| uses: changesets/action@6a0a831ff30acef54f2c6aa1cbbc1096b066edaf # v1.7.0 | |
| id: changesets | |
| with: | |
| title: 🚀 Release apps | |
| commit: Release apps | |
| publish: pnpm github:release | |
| createGithubReleases: true | |
| env: | |
| GITHUB_TOKEN: ${{ steps.get-token.outputs.token }} | |
| - name: Find previous comment with checklist on release PR | |
| if: steps.changesets.outputs.hasChangesets == 'true' | |
| uses: peter-evans/find-comment@d5fe37641ad8451bdd80312415672ba26c86575e # v3.0.0 | |
| id: find-comment | |
| with: | |
| issue-number: ${{ steps.changesets.outputs.pullRequestNumber }} | |
| body-includes: Releasing AvaTax app checklist | |
| - name: Add release checklist comment to release PR | |
| if: steps.changesets.outputs.hasChangesets == 'true' | |
| uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0 | |
| with: | |
| issue-number: ${{ steps.changesets.outputs.pullRequestNumber }} | |
| comment-id: ${{ steps.find-comment.outputs.comment-id }} | |
| edit-mode: replace | |
| body: | | |
| 🚀 [Releasing AvaTax app checklist](https://www.notion.so/saleor/Releasing-AvaTax-app-checklist-5bf7928b942042e09e4197b70903c570) |