Skip to content

Commit

Permalink
chore: update action (#2315)
Browse files Browse the repository at this point in the history
  • Loading branch information
iamkun committed May 29, 2023
1 parent b3ab757 commit 7ce994e
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 38 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release
on:
workflow_run:
workflows: ["Lint & Unit Test"]
branches: [master]
types:
- completed

permissions:
contents: read # for checkout

jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*" # semantic-release requires Node >= 18
- name: Install dependencies
run: npm clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm install -g @semantic-release/changelog @semantic-release/git semantic-release && semantic-release && echo release success
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ docs
.travis.yml
karma.sauce.conf.js
.github
.releaserc
16 changes: 16 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"branches": ["master"],
"prepare": [
{
"path": "@semantic-release/changelog"
},
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
]
}
]
]
}
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

15 changes: 0 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,6 @@
"src/**/*"
]
},
"release": {
"prepare": [
{
"path": "@semantic-release/changelog"
},
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md"
]
}
]
]
},
"keywords": [
"dayjs",
"date",
Expand Down

0 comments on commit 7ce994e

Please sign in to comment.