create_release_pr #38
This file contains 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_release_pr | |
on: workflow_dispatch | |
env: | |
SCCACHE_GHA_ENABLED: 'true' | |
RUSTC_WRAPPER: 'sccache' | |
jobs: | |
bump_version: | |
name: bump_version | |
runs-on: ubuntu-latest | |
steps: | |
- name: Create GitHub App Token | |
uses: actions/create-github-app-token@v1 | |
id: generate_token | |
with: | |
app-id: ${{ vars.PR_AUTOMATION_BOT_PUBLIC_APP_ID }} | |
private-key: ${{ secrets.PR_AUTOMATION_BOT_PUBLIC_PRIVATE_KEY }} | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Python | |
uses: dfinity/ci-tools/actions/setup-python@main | |
- name: Setup Commitizen | |
uses: dfinity/ci-tools/actions/setup-commitizen@main | |
- name: Setup PNPM | |
uses: dfinity/ci-tools/actions/setup-pnpm@main | |
- name: Setup DFX | |
uses: dfinity/setup-dfx@main | |
- name: Run sccache-cache | |
uses: mozilla-actions/[email protected] | |
# Triggers installation of the Rust toolchain | |
# Must be done before wasm-pack is installed | |
- name: Cargo metadata | |
run: cargo metadata --format-version 1 | |
- name: Setup wasm-pack | |
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | |
- name: Bump version | |
id: bump_version | |
uses: dfinity/ci-tools/actions/bump-version@main | |
- name: Print Version | |
run: echo "Bumping to version ${{ steps.bump_version.outputs.version }}" | |
- name: Generate canister declarations | |
run: dfx generate | |
- name: Update Cargo.lock | |
run: | | |
cargo build | |
pnpm build | |
- name: Create Pull Request | |
uses: dfinity/ci-tools/actions/create-pr@main | |
with: | |
token: ${{ steps.generate_token.outputs.token }} | |
branch_name: 'release/${{ steps.bump_version.outputs.version }}' | |
pull_request_title: 'chore: release ${{ steps.bump_version.outputs.version }}' | |
pull_request_body: | | |
After merging this PR, tag the merge commit with: | |
```shell | |
git tag ${{ steps.bump_version.outputs.version }} | |
git push origin ${{ steps.bump_version.outputs.version }} | |
``` | |
commit_message: 'chore: release ${{ steps.bump_version.outputs.version }}' |