Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100name: Releasepermissions: actions: write contents: writeon: push: tags: - "[0-9]+.*"jobs: wait-for-build: runs-on: ubuntu-latest steps: - name: Wait for Build workflow env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | sha="${{ github.sha }}" echo "Waiting for Build workflow to complete on $sha..." while true; do result=$(gh api "repos/${{ github.repository }}/actions/workflows/build.yml/runs" \ --jq ".workflow_runs[] | select(.head_sha == \"$sha\") | .conclusion" | head -1) case "$result" in success) echo "Build passed"; exit 0 ;; failure|cancelled|timed_out) echo "Build $result"; exit 1 ;; *) echo "Build still running..."; sleep 30 ;; esac done create-release: needs: wait-for-build runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - uses: taiki-e/create-gh-release-action@v1 with: changelog: CHANGELOG.md draft: true title: v$tag token: ${{ secrets.GITHUB_TOKEN }} upload-assets: needs: create-release strategy: matrix: include: - target: x86_64-apple-darwin os: macos-15-intel - target: aarch64-apple-darwin os: macos-latest - target: x86_64-unknown-linux-gnu os: ubuntu-latest - target: x86_64-unknown-linux-musl os: ubuntu-latest - target: aarch64-unknown-linux-gnu os: ubuntu-latest - target: aarch64-unknown-linux-musl os: ubuntu-latest runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v7 - uses: taiki-e/upload-rust-binary-action@v1 with: bin: doing target: ${{ matrix.target }} archive: doing-v$tag-$target checksum: sha256 token: ${{ secrets.GITHUB_TOKEN }} publish-crates: runs-on: ubuntu-latest needs: upload-assets steps: - uses: actions/checkout@v7 - uses: ./.github/actions/setup - name: Publish crates env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} run: cargo workspaces publish --publish-as-is --allow-dirty publish-release: needs: upload-assets runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - name: Publish release env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh release edit "${{ github.ref_name }}" --draft=false - name: Trigger docs deployment env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: gh workflow run docs.yml notify-discord: needs: publish-release runs-on: ubuntu-latest steps: - name: Post to Discord env: DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} run: |- curl -H "Content-Type: application/json" \ -d "{\"content\": \"**doing v${{ github.ref_name }}** has been released! https://github.com/${{ github.repository }}/releases/tag/${{ github.ref_name }}\"}" \ "$DISCORD_WEBHOOK_URL"