Skip to content

Commit c9358e1

Browse files
committed
ci: add labels sync, release and stale workflows
1 parent ad6f5b1 commit c9358e1

8 files changed

Lines changed: 65 additions & 218 deletions

File tree

.github/labels.json

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

.github/lock.yml

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

.github/stale.yml

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

.github/workflows/checks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: checks
22
on:
33
- push
44
- pull_request
5+
- workflow_call
56

67
jobs:
78
test:

.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 }}

.github/workflows/stale.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: 'Close stale issues and PRs'
2+
on:
3+
schedule:
4+
- cron: '30 0 * * *'
5+
6+
jobs:
7+
stale:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/stale@v9
11+
with:
12+
stale-issue-message: 'This issue has been marked as stale because it has been inactive for more than 21 days. Please reopen if you still need help on this issue'
13+
stale-pr-message: 'This pull request has been marked as stale because it has been inactive for more than 21 days. Please reopen if you still intend to submit this pull request'
14+
close-issue-message: 'This issue has been automatically closed because it has been inactive for more than 4 weeks. Please reopen if you still need help on this issue'
15+
close-pr-message: 'This pull request has been automatically closed because it has been inactive for more than 4 weeks. Please reopen if you still intend to submit this pull request'
16+
days-before-stale: 21
17+
days-before-close: 5

.husky/commit-msg

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

0 commit comments

Comments
 (0)