Skip to content

Commit

Permalink
chore: add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thetutlage committed Dec 23, 2024
1 parent 0766ed9 commit 6965533
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: test
on:
- push
- pull_request
- workflow_call

jobs:
lint:
uses: adonisjs/.github/.github/workflows/lint.yml@main
Expand All @@ -14,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node-version: [20, 21]
node-version: [20, 22]
postgres-version: [11]
services:
postgres:
Expand Down Expand Up @@ -52,7 +54,7 @@ jobs:
fail-fast: false
matrix:
mysql: [{ version: '8.0', command: 'mysql' }]
node-version: [21]
node-version: [22]
services:
mysql:
image: mysql:${{ matrix.mysql.version }}
Expand Down
15 changes: 15 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Sync labels
on:
workflow_dispatch:
permissions:
issues: write
jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EndBug/label-sync@v2
with:
config-file: 'https://raw.githubusercontent.com/thetutlage/static/main/labels.yml'
delete-other-labels: true
token: ${{ secrets.GITHUB_TOKEN }}
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: release
on: workflow_dispatch
permissions:
contents: write
id-token: write
jobs:
checks:
uses: ./.github/workflows/checks.yml
release:
needs: checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
- name: git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Init npm config
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm install
- run: npm run release -- --ci
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 6965533

Please sign in to comment.