Skip to content

Commit

Permalink
Refactor release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Nico Wagner <[email protected]>
  • Loading branch information
nwagner84 committed Feb 9, 2025
1 parent 0785280 commit 9c41e3d
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Release

on:
pull_request:
paths:
- .github/workflows/*.yml
- Cargo.toml
- crates/**
- src/**

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
RUSTDOCFLAGS: "-Dwarnings"
RUSTUP_MAX_RETRIES: 10
RUST_BACKTRACE: 1
VERSION: "v1.0.0" # FIXME

permissions:
contents: write

defaults:
run:
shell: bash

jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get release version
if: env.VERSION == ''
run: |
echo "RELEASE_TAG=${{ github.ref_name }}" >> $GITHUB_ENV
echo "VERSION=${github.ref_name#v}" >> $GITHUB_ENV
- name: Show release version
run: |
echo "Release tag is $RELEASE_TAG"
echo "Release version is $VERSION"
- name: Create GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# FIXME: --verify-tag
run: gh release create $RELEASE_TAG--draft --generate-notes --title $RELEASE_TAG


release:
runs-on: ubuntu-latest
needs:
- prepare
steps:
- run: exit 0

0 comments on commit 9c41e3d

Please sign in to comment.