Skip to content

Commit

Permalink
add release github action
Browse files Browse the repository at this point in the history
  • Loading branch information
xxshady committed Dec 18, 2024
1 parent 4b0c395 commit af10773
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: checkout
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0

- name: rust version
run: rustc -V

- name: prepare relib crate
run:
chmod +x ./scripts/build_relib_crate.sh
./scripts/build_relib_crate.sh

- name: auth
run: |
git config --global user.name "release"
git config --global user.email "release@release.release"
- name: cargo login
run: cargo login ${{ secrets.CRATES_IO_TOKEN }}

- name: extract version from tag
id: extract_version
run: |
VERSION=$( echo ${{ github.ref_name }} | grep -oP 'v\K.*' )
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: print version
run: echo ${{ steps.extract_version.outputs.VERSION }}

- name: install cargo-binstall
uses: cargo-bins/cargo-binstall@v1.10.12

- name: install cargo-release
run: |
cargo binstall cargo-release@=0.25.13 --no-confirm
- name: cargo release
run: |
cargo release ${{ steps.extract_version.outputs.VERSION }} --no-confirm --execute

0 comments on commit af10773

Please sign in to comment.