Skip to content

Commit

Permalink
Add publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
survived committed Nov 23, 2023
1 parent 65fdfca commit 2027d03
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
push:
tags:
- 'v*'
- 'derive-v*'
workflow_dispatch:

name: Publish

env:
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: true

jobs:
publish-round-based:
name: Publish round-based
environment: crates.io
runs-on: ubuntu-latest
if: >-
github.ref_type == 'tag'
&& startsWith(github.ref_name, 'v')
&& endsWith(github.ref_name, '-round-based')
steps:
- uses: actions/checkout@v3
- run: cargo publish -p round-based --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}
publish-derive:
name: Publish round-based-derive
environment: crates.io
runs-on: ubuntu-latest
if: >-
github.ref_type == 'tag'
&& startsWith(github.ref_name, 'v')
&& endsWith(github.ref_name, '-derive')
steps:
- uses: actions/checkout@v3
- run: cargo publish -p round-based-derive --token ${CRATES_TOKEN}
env:
CRATES_TOKEN: ${{ secrets.CRATES_TOKEN }}

0 comments on commit 2027d03

Please sign in to comment.