forked from GitHub/bdwgc-rust
Add release workflow (#368)
This commit is contained in:
21
.github/workflows/release.yaml
vendored
Normal file
21
.github/workflows/release.yaml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: release
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
concurrency:
|
||||
group: release-${{ github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{ github.ref == 'refs/heads/main' && 'release' || 'test' }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: raviqqe/cargo-cache@v1
|
||||
- run: cargo install cargo-workspaces
|
||||
- run: cargo workspaces publish -y --from-git
|
||||
env:
|
||||
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
|
||||
if: github.ref == 'refs/heads/main'
|
||||
Reference in New Issue
Block a user