Skip to content

Commit

Permalink
Merge pull request #21 from Itheum/develop
Browse files Browse the repository at this point in the history
release
  • Loading branch information
damienen authored Apr 30, 2024
2 parents d9fbf77 + 7fd0871 commit b56e4a8
Show file tree
Hide file tree
Showing 5 changed files with 10,062 additions and 1,901 deletions.
3 changes: 3 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["@commitlint/config-conventional"]
}
39 changes: 21 additions & 18 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,29 @@ permissions:
contents: write

jobs:
publish-npm:
release:
name: Release
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 16
registry-url: https://registry.npmjs.org/

- name: Create release
node-version: lts/*
- name: Install dependencies
run: npx ci
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
- name: Lint
run: npm run lint:fix
- name: Test
run: npm run test --if-present
- name: Build
run: npm run build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
RELEASE_TAG=v$(node -p "require('./package.json').version")
gh release create $RELEASE_TAG --target=$GITHUB_SHA --title="$RELEASE_TAG"
- run: npm ci
- run: npm test

- name: Publish to npmjs
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: npm publish --access=public
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm config set access public && npx semantic-release
Loading

0 comments on commit b56e4a8

Please sign in to comment.