-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (52 loc) · 1.87 KB
/
release.yml
File metadata and controls
55 lines (52 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: Manual Release
on:
workflow_dispatch:
permissions:
id-token: write # Required for OIDC
contents: write
actions: read
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.sha }}
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '24.x'
registry-url: 'https://registry.npmjs.org'
- name: Check CI pipeline status
id: check_ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_FILE: ci-pipeline.yml
run: node .github/scripts/check-ci.mjs
- name: Check CodeQL status
id: check_codeql
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WORKFLOW_FILE: codeql.yml
run: node .github/scripts/check-ci.mjs
- name: Configure Git user
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
- name: Install dependencies
run: npm ci
- name: Run release script
id: release
if: ${{ steps.check_ci.outputs.result == 'true' && steps.check_codeql.outputs.result == 'true' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: node .github/scripts/release.mjs
- name: Check npm for current version
id: check_npm
if: ${{ steps.check_ci.outputs.result == 'true' && steps.check_codeql.outputs.result == 'true' }}
run: node .github/scripts/check-npm.mjs
- name: Publish to npm
if: ${{ steps.check_ci.outputs.result == 'true' && steps.check_codeql.outputs.result == 'true' && (steps.release.outputs.released == 'true' || steps.check_npm.outputs.exists == 'false') }}
run: npm publish --provenance --access public