Skip to content

Commit

Permalink
Add CI workflow to publish crates on tag/release (#14)
Browse files Browse the repository at this point in the history
* Add CI workflow to publish crates on tag/release

This commit adds a new github actions work to publish the package's
crates to crates.io. This new CI job run cargo publish on the respective
crates in the correct order to publish the entire workspace.

* Update package dirs after #13 and #15

* Update package dirs after #27

* Choose names that better describe actions taken

* Put list of crates to release (publish on crates.io) in topo order

---------

Co-authored-by: John Lapeyre <[email protected]>
  • Loading branch information
mtreinish and jlapeyre authored Jan 21, 2024
1 parent d894bf8 commit 84236e7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Release openqasm3_parser
on:
push:
tags:
- '*'

jobs:
publish_crates:
name: Publish openqasm3_parser crates
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crate: [oq3_lexer, oq3_parser, oq3_syntax, oq3_source_file, oq3_semantics]

steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run cargo publish
run: |
cd crates/${{ matrix.crate }}
cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

0 comments on commit 84236e7

Please sign in to comment.