Skip to content

Commit

Permalink
ci(release_oxlint): split out github release job
Browse files Browse the repository at this point in the history
  • Loading branch information
Boshen committed Dec 13, 2024
1 parent 5d42df8 commit 1eab12a
Showing 1 changed file with 31 additions and 21 deletions.
52 changes: 31 additions & 21 deletions .github/workflows/release_oxlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,30 +148,12 @@ jobs:
needs: [check, build]
runs-on: ubuntu-latest
permissions:
contents: write # for softprops/[email protected]
id-token: write # for `pnpm publish --provenance`
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0 # for changelog
persist-credentials: false

- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
with:
restore-cache: false
tools: cargo-release-oxc

- name: Run
id: run
run: |
mkdir -p target
cargo release-oxc changelog --release oxlint
{
echo 'CHANGELOG<<EOF'
cat ./target/OXC_CHANGELOG
echo EOF
} >> $GITHUB_OUTPUT
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4
with:
merge-multiple: true
Expand Down Expand Up @@ -203,8 +185,36 @@ jobs:
echo '----'
done
github_release:
name: GitHub Release
needs: [publish]
runs-on: ubuntu-latest
permissions:
contents: write # for softprops/[email protected]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0 # for changelog
persist-credentials: false

- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
with:
restore-cache: false
tools: cargo-release-oxc

- name: Run
id: run
run: |
mkdir -p target
cargo release-oxc changelog --release oxlint
{
echo 'CHANGELOG<<EOF'
cat ./target/OXC_CHANGELOG
echo EOF
} >> $GITHUB_OUTPUT
- name: Create GitHub Release
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
uses: softprops/action-gh-release@01570a1f39cb168c169c802c3bceb9e93fb10974 # v2.1.0
with:
body: ${{ steps.run.outputs.CHANGELOG }}
draft: false
Expand All @@ -218,7 +228,7 @@ jobs:
run: sleep 180s

smoke:
needs: [check, publish]
needs: [check, publish, github_release]
strategy:
matrix:
include:
Expand All @@ -240,7 +250,7 @@ jobs:
npx oxlint@${OXLINT_VERSION} ./test.js
eslint-plugin-oxlint:
needs: [check, publish, smoke]
needs: [check, publish, github_release, smoke]
name: Update eslint-plugin-oxlint
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 1eab12a

Please sign in to comment.