|
4 | 4 | Coverage: |
5 | 5 | runs-on: ubuntu-latest |
6 | 6 | steps: |
7 | | - - uses: actions/checkout@v4 |
8 | | - - uses: actions/setup-node@v4 |
9 | 7 | - run: npm install --no-audit && npm install -g uglify-js |
| 8 | + - uses: actions/checkout@v5 |
| 9 | + - uses: actions/setup-node@v5 |
10 | 10 | - run: npm audit --audit-level=low |
11 | 11 | - run: npx c8 -r lcovonly -r text npm test |
12 | 12 | - run: npx lj lint |
13 | 13 | - uses: coverallsapp/github-action@v2 |
14 | 14 | name: Upload to coveralls.io |
15 | 15 | with: |
16 | 16 | github-token: ${{ github.token }} |
17 | | - Analyze: |
| 17 | + Bun: |
18 | 18 | runs-on: ubuntu-latest |
19 | 19 | steps: |
20 | | - - uses: actions/checkout@v4 |
21 | | - - uses: github/codeql-action/init@v3 |
22 | | - with: |
23 | | - languages: javascript |
24 | | - - uses: github/codeql-action/analyze@v3 |
| 20 | + - uses: actions/checkout@v5 |
| 21 | + - uses: oven-sh/setup-bun@v2 |
| 22 | + - run: bun i |
| 23 | + - run: bun x lj t |
25 | 24 | with: |
26 | 25 | category: /language:javascript |
| 26 | + Analyze: |
| 27 | + uses: litejs/.github/.github/workflows/analyze.yml@main |
27 | 28 | Release: |
28 | 29 | if: startsWith(github.ref, 'refs/tags/v') |
29 | 30 | needs: [Analyze, Coverage] |
30 | | - runs-on: ubuntu-latest |
31 | | - steps: |
32 | | - - uses: actions/checkout@v4 |
33 | | - with: |
34 | | - ref: ${{ github.ref }} |
35 | | - - run: | |
36 | | - echo '${{ vars.RELEASE_SIGNERS }}' > ./allowed_signers |
37 | | - git config gpg.ssh.allowedSignersFile ./allowed_signers |
38 | | - git verify-tag -v ${{ github.ref_name }} |
39 | | - name: Verify release tag signature |
40 | | - - uses: actions/setup-node@v4 |
41 | | - with: |
42 | | - registry-url: https://registry.npmjs.org/ |
43 | | - - run: | |
44 | | - MSG=$(git log -1 --no-show-signature --format=%B $TAG) |
45 | | - TITLE=$(echo "$MSG" | head -n 1) |
46 | | - NOTES=$(echo "$MSG" | tail -n +2) |
47 | | - gh release create $TAG --title "$TITLE" --notes "$NOTES" |
48 | | - gh run list --json databaseId -q '.[20:]|.[].databaseId' --limit 100 | xargs -I{} gh run delete "{}" |
49 | | - [[ "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "PUBLISH=latest" >> $GITHUB_ENV || echo "PUBLISH=next" >> $GITHUB_ENV |
50 | | - env: |
51 | | - GH_TOKEN: ${{ github.token }} |
52 | | - TAG: ${{ github.ref_name }} |
53 | | - - run: npm publish --access public --tag $PUBLISH |
54 | | - env: |
55 | | - NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} |
| 31 | + uses: litejs/.github/.github/workflows/release.yml@main |
| 32 | + secrets: inherit |
56 | 33 |
|
0 commit comments