diff --git a/.github/workflows/ci-job.yml b/.github/workflows/ci-job.yml index 69f8bc71a..2b1d3e579 100644 --- a/.github/workflows/ci-job.yml +++ b/.github/workflows/ci-job.yml @@ -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 diff --git a/.github/workflows/ci-publish/action.yml b/.github/workflows/ci-publish/action.yml new file mode 100644 index 000000000..695f16347 --- /dev/null +++ b/.github/workflows/ci-publish/action.yml @@ -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" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1fc4c32bd..ce33fd6d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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