Release #43
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: | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'New version' | |
| required: true | |
| type: string | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: "full" | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| release: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Cleanup unused stuff | |
| run: | | |
| df -h / | |
| sudo rm -rf \ | |
| "$AGENT_TOOLSDIRECTORY" \ | |
| /opt/google/chrome \ | |
| /opt/microsoft/msedge \ | |
| /opt/microsoft/powershell \ | |
| /opt/pipx \ | |
| /usr/lib/mono \ | |
| /usr/local/julia* \ | |
| /usr/local/lib/android \ | |
| /usr/local/lib/node_modules \ | |
| /usr/local/share/chromium \ | |
| /usr/local/share/powershell \ | |
| /usr/share/dotnet \ | |
| /usr/share/swift | |
| df -h / | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| submodules: true | |
| ssh-key: ${{ secrets.DEPLOY_KEY }} | |
| fetch-depth: '0' | |
| - uses: extractions/setup-just@e33e0265a09d6d736e2ee1e0eb685ef1de4669ff # v3 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: cargo-bins/cargo-binstall@ec80feb9e330418e014932e5982599255eff6dbb # v1.17.4 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Install requirements | |
| run: just install-requirements | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Pull required docker images | |
| if: runner.os == 'Linux' | |
| uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2 | |
| with: | |
| timeout_minutes: 10 | |
| max_attempts: 10 | |
| command: docker pull public.ecr.aws/ubuntu/ubuntu:latest | |
| - uses: actions/setup-go@7a3fe6cf4cb3a834922a1244abfce67bcef6a0c5 # v6.2.0 | |
| with: | |
| go-version: '^1.22.0' | |
| cache-dependency-path: "**/go.sum" | |
| - run: go version | |
| - name: Install Protoc | |
| uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0 | |
| with: | |
| version: "25.3" | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - run: protoc --version | |
| - run: brew install pulumi | |
| if: runner.os == 'macOS' | |
| - run: pulumi version | |
| - run: pulumi login --local | |
| - uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2 | |
| with: | |
| shared-key: build-examples | |
| save-if: false | |
| - name: Replace version | |
| run: just update-version "${{ github.event.inputs.version }}" | |
| - name: Base and e2e tests | |
| run: just base-ci-flow native-ci-flow wasm-ci-flow c-ci-flow | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Setup git name and email | |
| run: | | |
| git config --local user.name "GitHub Actions" | |
| git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| - name: Push version change | |
| run: | | |
| git add -A | |
| git commit -m "Update version to ${{ github.event.inputs.version }}" | |
| - name: Generate new changelog | |
| run: | | |
| just changelog-generate-for-repo "${{ github.event.inputs.version }}" | |
| - name: Copy changelog to new version directory | |
| run: | | |
| mv .changelog/unreleased .changelog/${{ github.event.inputs.version }} | |
| rm .changelog/${{ github.event.inputs.version }}/.gitkeep | |
| mkdir .changelog/unreleased | |
| touch .changelog/unreleased/.gitkeep | |
| - name: Commit changes | |
| run: | | |
| git add -A | |
| git commit -m "Update changelog for version ${{ github.event.inputs.version }}" | |
| - name: Create commit | |
| run: | | |
| git commit --allow-empty -m "Release v${{ github.event.inputs.version }}" | |
| git tag "v${{ github.event.inputs.version }}" | |
| git push origin "v${{ github.event.inputs.version }}" | |
| git revert HEAD~2 # Revert renaming | |
| git commit --amend -m "Restore version to 0.0.0-DEV" | |
| git push | |
| - name: Release | |
| uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0 | |
| with: | |
| name: ${{ github.event.inputs.version }} | |
| tag_name: "v${{ github.event.inputs.version }}" | |
| body_path: target/github_changelog.md |