Skip to content

Commit

Permalink
ci: Fix secret used for publishing (#66)
Browse files Browse the repository at this point in the history
# What ❔

Uses a dedicated secret for publishing workflows. 

## Why ❔

This is necessary because of `GITHUB_TOKEN` limitations.
  • Loading branch information
slowli committed Sep 23, 2024
1 parent 53f8f88 commit 5e7f91d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 26 deletions.
20 changes: 0 additions & 20 deletions .github/workflows/check-pr-title.yml

This file was deleted.

13 changes: 11 additions & 2 deletions .github/workflows/pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: guibranco/[email protected]
if: always()
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
state: ${{ (steps.lint_pr_title.outputs.error_message != null) && 'error' || 'success' }}
context: 'conventional-pr-title'
description: PR title ${{ (steps.lint_pr_title.outputs.error_message != null) && 'does not match' || 'matches' }} Conventional Commits spec
sha: ${{ github.event.pull_request.head.sha }}

- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
Expand All @@ -27,7 +36,7 @@ jobs:
header: pr-title-lint-error
message: |
Hey there! 👋🏼
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
Examples of valid PR titles:
Expand All @@ -36,7 +45,7 @@ jobs:
- ci: Add new workflow for linting
Details:
```
${{ steps.lint_pr_title.outputs.error_message }}
```
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-please-prepare-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ jobs:
runs-on: [ubuntu-latest]
name: "release-please: Update version in Cargo.toml"
needs: [check_state]
permissions:
contents: write
if: ${{ needs.check_state.outputs.already_committed != 'true' }}
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
Expand All @@ -65,7 +63,7 @@ jobs:
run: |
git config --global user.email "[email protected]"
git config --global user.name "zksync-era-bot"
git remote set-url origin 'https://${{ secrets.GITHUB_TOKEN }}@github.com/matter-labs/vm2.git'
git remote set-url origin 'https://${{ secrets.RELEASE_TOKEN }}@github.com/matter-labs/vm2.git'
git add ./Cargo.toml
git commit -m "$EXPECTED_COMMIT_MESSAGE"
git push
2 changes: 1 addition & 1 deletion .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
id: release
uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4.1.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.RELEASE_TOKEN }}
config-file: .github/release-please/config.json
manifest-file: .github/release-please/manifest.json

Expand Down

0 comments on commit 5e7f91d

Please sign in to comment.