Remove setup-cog action #216
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: Release | |
| on: | |
| push: | |
| branches: ["main"] | |
| workflow_dispatch: ~ | |
| env: | |
| DEVBOX_VERSION: '0.16.0' | |
| # Grant GITHUB_TOKEN the permissions required to make a release | |
| permissions: | |
| contents: write # to push new branches | |
| pull-requests: write # to open PRs | |
| id-token: write # to retrieve vault secrets | |
| # Allow only one concurrent release, skipping runs queued between the run in-progress and latest queued. | |
| # However, do NOT cancel in-progress runs as we want to allow these releases to complete. | |
| concurrency: | |
| group: "release" | |
| cancel-in-progress: false | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| release: | |
| name: Prepare and perform a release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Install devbox | |
| uses: jetify-com/devbox-install-action@a0d2d53632934ae004f878c840055956d9f741b0 #v0.14.0 | |
| with: | |
| enable-cache: 'true' | |
| devbox-version: ${{ env.DEVBOX_VERSION }} | |
| - name: Get secrets | |
| uses: grafana/shared-workflows/actions/get-vault-secrets@c2f1df59dba624b3fd509e5181aa8da5217120c0 | |
| with: | |
| repo_secrets: | | |
| GITHUB_APP_ID=github_app:app-id | |
| GITHUB_APP_PRIVATE_KEY=github_app:private-key | |
| - name: Generate github private token | |
| id: generate_github_token | |
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | |
| with: | |
| app-id: ${{ env.GITHUB_APP_ID }} | |
| private-key: ${{ env.GITHUB_APP_PRIVATE_KEY }} | |
| owner: ${{ github.repository_owner }} | |
| - name: Prepare a release | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git config --global url."https://x-access-token:${{ env.GENERATED_GITHUB_TOKEN }}@github.com/".insteadOf "git@github.com:" | |
| devbox run make prepare-release | |
| env: | |
| TERM: 'xterm' | |
| LOG_LEVEL: '7' # debug | |
| GOGC: 'off' | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # to be used by `gh` | |
| DRY_RUN: 'no' | |
| SKIP_VALIDATION: 'no' | |
| GENERATED_GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }} | |
| - name: Release | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| git config --global url."https://x-access-token:${{ env.GENERATED_GITHUB_TOKEN }}@github.com/".insteadOf "git@github.com:" | |
| devbox run ./scripts/release.sh | |
| env: | |
| TERM: 'xterm' | |
| LOG_LEVEL: '7' # debug | |
| GOGC: 'off' | |
| DRY_RUN: 'no' | |
| GENERATED_GITHUB_TOKEN: ${{ steps.generate_github_token.outputs.token }} |