Skip to content

Cargo Bleeding Release #56

Cargo Bleeding Release

Cargo Bleeding Release #56

# Runs on push to main.
name: Cargo Bleeding Release
on:
workflow_run:
workflows: ["Cargo Build"]
types:
- completed
concurrency:
group: bleeding-release-${{ github.ref }}
cancel-in-progress: true
jobs:
# build:
# uses: ./.github/workflows/cargo-build.yml
bleeding-release:
runs-on: ubuntu-latest
# needs: build
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
fetch-depth: 0
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
path: artifacts
- name: Delete the previous bleeding release
run: |
gh release delete bleeding -y --cleanup-tag || true
env:
GH_TOKEN: ${{ github.token }}
- name: Delay 10s
run: sleep 10
- name: Zip each artifact directory
run: |
for dir in artifacts/*/; do
base=$(basename "$dir")
(cd "$dir" && zip -r "../${base}.zip" .)
done
- name: Bleeding Artifact Upload
uses: softprops/action-gh-release@v1
with:
body: |
This is an automatic release generated from the last successful commit to the main branch. While this was a successful build, the resulting binary may not be fully stable.
SHA: ${{ github.sha }}
name: 'Latest Build on main'
tag_name: bleeding
prerelease: true
files: artifacts/**/*.zip