Skip to content

Refactor release workflow #135

Refactor release workflow

Refactor release workflow #135

Workflow file for this run

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