Skip to content

Commit

Permalink
fix: publish action (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmastrac authored Jan 24, 2024
1 parent 1051b6c commit 150725a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ jobs:
if: inputs.job == 'test-miri'
uses: ./.github/workflows/ci-test-miri

- name: Publish
id: publish
if: inputs.job == 'publish'
uses: ./.github/workflows/ci-publish

env:
CARGO_INCREMENTAL: 0
GH_ACTIONS: 1
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/ci-publish/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Publish workflow
runs:
using: "composite"
steps:
- name: Cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p serde_v8 && cargo publish -p deno_ops && cargo publish -p deno_core
- name: Get tag version
id: get_tag_version
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> "$GITHUB_OUTPUT"
14 changes: 5 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,9 @@ jobs:
publish:
name: publish
needs: top
runs-on: ubuntu-latest
if: github.repository == 'denoland/deno_core' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: cargo publish -p serde_v8 && cargo publish -p deno_ops && cargo publish -p deno_core
- name: Get tag version
id: get_tag_version
run: echo TAG_VERSION=${GITHUB_REF/refs\/tags\//} >> "$GITHUB_OUTPUT"
uses: ./.github/workflows/ci-job.yml
with:
label: linux
os: ubuntu-latest
job: publish

0 comments on commit 150725a

Please sign in to comment.