Skip to content

Commit 5ac24c5

Browse files
2 parents 1f55b23 + 4526304 commit 5ac24c5

24 files changed

Lines changed: 5856 additions & 172 deletions

.github/workflows/release-plz.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Release Plz
2+
3+
permissions: {}
4+
5+
on:
6+
workflow_dispatch:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
release-plz:
13+
name: Release-plz
14+
runs-on: ubuntu-latest
15+
permissions:
16+
pull-requests: write
17+
contents: write
18+
steps:
19+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
with:
21+
fetch-depth: 0
22+
token: ${{ secrets.OXC_BOT_PAT }}
23+
persist-credentials: true # required by release-plz
24+
25+
- name: Run release-plz
26+
id: release-plz
27+
uses: MarcoIeni/release-plz-action@57d6b19001af9a5f21e461fc67adbb5a5f4d5ebe # v0.5.106
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.OXC_BOT_PAT }}
30+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
31+
32+
- name: Bump package.json
33+
if: ${{ steps.release-plz.outputs.prs_created }}
34+
env:
35+
GH_TOKEN: ${{ secrets.OXC_BOT_PAT }}
36+
PR_NUMBER: ${{ fromJSON(steps.release-plz.outputs.pr).number }}
37+
VERSION: ${{ fromJSON(steps.release-plz.outputs.pr).releases[0].version }}
38+
run: |
39+
set -e
40+
41+
pr_number="${PR_NUMBER}"
42+
43+
if [[ -n "$pr_number" ]]; then
44+
version="${VERSION}"
45+
46+
jq --arg version "${version}" '.version = ($version)' package.json > tmp
47+
mv tmp package.json
48+
49+
gh pr checkout $pr_number
50+
git add .
51+
git commit --amend --no-edit
52+
git push --force-with-lease
53+
fi

.github/workflows/zizmor.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Zizmor
2+
3+
permissions: {}
4+
5+
on:
6+
workflow_dispatch:
7+
pull_request:
8+
types: [opened, synchronize]
9+
paths:
10+
- ".github/workflows/**"
11+
push:
12+
branches:
13+
- main
14+
paths:
15+
- ".github/workflows/**"
16+
17+
jobs:
18+
zizmor:
19+
name: zizmor
20+
runs-on: ubuntu-latest
21+
permissions:
22+
security-events: write
23+
steps:
24+
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
25+
26+
- uses: taiki-e/install-action@83254c543806f3224380bf1001d6fac8feaf2d0b # v2.50.10
27+
with:
28+
tool: zizmor
29+
30+
- name: Run zizmor
31+
run: zizmor --format sarif . > results.sarif
32+
env:
33+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
35+
- name: Upload SARIF file
36+
uses: github/codeql-action/upload-sarif@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
37+
with:
38+
sarif_file: results.sarif
39+
category: zizmor

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
target/
22
/npm
3-
node_modules/
3+
/node_modules
4+
/fixtures/pnpm/node_modules
45
fuzz/Cargo.lock

0 commit comments

Comments
 (0)