From ba984e32f146103fe9cc4242dfac27f055f03ca6 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 11 Jan 2024 12:43:28 -0500 Subject: [PATCH 1/5] 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. --- .github/workflows/release.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..556a72e --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,25 @@ +--- +name: Release openqasm3_parser +on: + push: + tags: + - '*' + +jobs: + publish_lexer: + name: Publish oq3_lexer crate + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + crate: [lexer, parser, semantics, sourcegen, oq3_syntax, qasm3_bytecode, source_file] + + 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 }} From 0e9a370cbd2eca6084c06aadda85cb510c4f504f Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 11 Jan 2024 14:38:24 -0500 Subject: [PATCH 2/5] Update package dirs after #13 and #15 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 556a72e..eed0786 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - crate: [lexer, parser, semantics, sourcegen, oq3_syntax, qasm3_bytecode, source_file] + crate: [oq3_lexer, oq3_parser, oq3_semantics, oq3_sourcegen, oq3_syntax, oq3_source_file] steps: - uses: actions/checkout@v4 From d80b02a3d89569551e369b9ec6a44438677e8de2 Mon Sep 17 00:00:00 2001 From: John Lapeyre Date: Sat, 13 Jan 2024 11:39:44 -0500 Subject: [PATCH 3/5] Update package dirs after #27 --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index eed0786..270df09 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - crate: [oq3_lexer, oq3_parser, oq3_semantics, oq3_sourcegen, oq3_syntax, oq3_source_file] + crate: [oq3_lexer, oq3_parser, oq3_semantics, oq3_syntax, oq3_source_file] steps: - uses: actions/checkout@v4 From 4492956d13bf47de6d04af979e6ace808ae97ed9 Mon Sep 17 00:00:00 2001 From: John Lapeyre Date: Sat, 13 Jan 2024 12:05:24 -0500 Subject: [PATCH 4/5] Choose names that better describe actions taken --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 270df09..48dae77 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,8 @@ on: - '*' jobs: - publish_lexer: - name: Publish oq3_lexer crate + publish_crates: + name: Publish openqasm3_parser crates runs-on: ubuntu-latest strategy: fail-fast: false From e7a5b001ed7a4eea6dd35416a2ddfa6cc5ca9b6e Mon Sep 17 00:00:00 2001 From: John Lapeyre Date: Sun, 21 Jan 2024 12:31:04 -0500 Subject: [PATCH 5/5] Put list of crates to release (publish on crates.io) in topo order --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48dae77..db659f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - crate: [oq3_lexer, oq3_parser, oq3_semantics, oq3_syntax, oq3_source_file] + crate: [oq3_lexer, oq3_parser, oq3_syntax, oq3_source_file, oq3_semantics] steps: - uses: actions/checkout@v4