Skip to content

Commit

Permalink
chore: update semantic release to update the build
Browse files Browse the repository at this point in the history
  • Loading branch information
byCedric committed Jan 13, 2022
1 parent c2f11d2 commit 354dc08
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ concurrency:
group: release
cancel-in-progress: true

env:
release: ${{ github.ref == 'refs/heads/main' && github.event.inputs.release == 'release' }}

jobs:
release:
runs-on: ubuntu-latest
Expand All @@ -31,13 +28,13 @@ jobs:
run: yarn install --frozen-lockfile --check-files

- name: 📋 Dry-running release
if: ${{ !env.release }}
if: ${{ github.ref != 'refs/heads/main' || github.event.inputs.release != 'release' }}
run: yarn semantic-release --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: 📋 Release code
if: ${{ env.release }}
if: ${{ github.ref == 'refs/heads/main' && github.event.inputs.release == 'release' }}
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .releaserc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ module.exports = {
}],
'@semantic-release/changelog',
['@semantic-release/npm', { npmPublish: false }],
["@semantic-release/exec", { publishCmd: 'yarn build' }],
['@semantic-release/git', {
message: 'chore: create new release ${nextRelease.version}\n\n${nextRelease.notes}',
assets: ['package.json', 'CHANGELOG.md'],
assets: ['package.json', 'CHANGELOG.md', 'build/*'],
}],
'@semantic-release/github',
],
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@tsconfig/node16": "^1.0.2",
"@types/jest": "^27.4.0",
Expand Down
12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,18 @@
resolved "https://registry.yarnpkg.com/@semantic-release/error/-/error-3.0.0.tgz#30a3b97bbb5844d695eb22f9d3aa40f6a92770c2"
integrity sha512-5hiM4Un+tpl4cKw3lV4UgzJj+SmfNIDCLLw0TepzQxz9ZGV5ixnqkzIVF+3tp0ZHgcMKE+VNGHJjEeyFG2dcSw==

"@semantic-release/exec@^6.0.3":
version "6.0.3"
resolved "https://registry.yarnpkg.com/@semantic-release/exec/-/exec-6.0.3.tgz#d212fdf19633bdfb553de6cb6c7f8781933224db"
integrity sha512-bxAq8vLOw76aV89vxxICecEa8jfaWwYITw6X74zzlO0mc/Bgieqx9kBRz9z96pHectiTAtsCwsQcUyLYWnp3VQ==
dependencies:
"@semantic-release/error" "^3.0.0"
aggregate-error "^3.0.0"
debug "^4.0.0"
execa "^5.0.0"
lodash "^4.17.4"
parse-json "^5.0.0"

"@semantic-release/git@^10.0.1":
version "10.0.1"
resolved "https://registry.yarnpkg.com/@semantic-release/git/-/git-10.0.1.tgz#c646e55d67fae623875bf3a06a634dd434904498"
Expand Down

0 comments on commit 354dc08

Please sign in to comment.