Skip to content

Commit

Permalink
ci: publish jsr version in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Automated Version Bump authored and labithiotis committed Jul 7, 2024
1 parent bc46a21 commit 151d2db
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 13 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/2.version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Version

on:
push:
branches: [ main ]
branches: [main]

permissions:
contents: write
Expand All @@ -23,14 +23,24 @@ jobs:
- run: npm run test

version:
needs: [ test ]
name: Version
needs: [test]
name: Bump version
runs-on: ubuntu-latest
permissions:
contents: write
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: phips28/gh-action-bump-version@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- id: version
name: Bump version
uses: phips28/gh-action-bump-version@master
with:
tag-prefix: 'v'
skip-commit: true
- name: Update jsr.json
run: echo "`jq 'version="${{ steps.version.outputs.newTag }}"' jsr.json`" > jsr.json
- name: Commit
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add jsr.json && git commit -m "ci: version bump to ${{ steps.version.outputs.newTag }}"
git push
5 changes: 3 additions & 2 deletions .github/workflows/3.publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@ concurrency:

jobs:
publish-npm:
name: Publish
name: Publish NPM
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: JS-DevTools/npm-publish@v2
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}

publish-jsr:
name: Publish JSR
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
4 changes: 2 additions & 2 deletions jsr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@labithiotis/express-list-routes",
"version": "0.1.0",
"version": "1.2.2",
"exports": "./index.js"
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 151d2db

Please sign in to comment.