Skip to content

Commit 7adbb0c

Browse files
committed
ci: add release and labels workflows
1 parent c5e2032 commit 7adbb0c

File tree

4 files changed

+48
-171
lines changed

4 files changed

+48
-171
lines changed

.github/labels.json

Lines changed: 0 additions & 170 deletions
This file was deleted.

.github/workflows/checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: checks
22
on:
33
- push
44
- pull_request
5-
5+
- workflow_call
66
jobs:
77
test:
88
uses: edge-js/.github/.github/workflows/test.yml@main

.github/workflows/labels.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Sync labels
2+
on:
3+
workflow_dispatch:
4+
permissions:
5+
issues: write
6+
jobs:
7+
labels:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
- uses: EndBug/label-sync@v2
12+
with:
13+
config-file: 'https://raw.githubusercontent.com/thetutlage/static/main/labels.yml'
14+
delete-other-labels: true
15+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: release
2+
on: workflow_dispatch
3+
permissions:
4+
contents: write
5+
id-token: write
6+
jobs:
7+
checks:
8+
uses: ./.github/workflows/checks.yml
9+
release:
10+
needs: checks
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
- name: git config
20+
run: |
21+
git config user.name "${GITHUB_ACTOR}"
22+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
23+
- name: Init npm config
24+
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
25+
env:
26+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
- run: npm install
28+
- run: npm run release -- --ci
29+
env:
30+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)