Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
name: Release

# build workflow
on:
workflow_run:
# Trigger this workflow when the "build, test and lint" workflow completes on the main branch
workflows: ["build, test and lint"]
types:
- completed
push:
branches:
- main
- cmn/releaseTest

permissions:
contents: write

jobs:
check:
# Only run if the triggering workflow succeeded
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
outputs:
should_release: ${{ steps.check.outputs.should_release }}
Expand Down Expand Up @@ -44,7 +39,7 @@ jobs:
release:
needs: check
# Only run release job if a release is needed and prevent releases from forks
if: needs.check.outputs.should_release == 'true' && github.repository == 'Chrilleweb/dotenv-diff'
if: needs.check.outputs.should_release == 'true'
runs-on: ubuntu-latest
permissions:
id-token: write
Expand Down Expand Up @@ -75,6 +70,6 @@ jobs:
- run: pnpm install --frozen-lockfile

- name: Run release-it
run: pnpm release -- --ci
run: pnpm release -- --ci --dry-run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
10 changes: 4 additions & 6 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"tagName": "v${version}",
"requireCleanWorkingDir": true,
"requireUpstream": true,
"push": true
"push": true,
"commitArgs": ["--no-verify"],
"tagArgs": ["--no-sign"]
},
"github": {
"release": true,
Expand All @@ -17,11 +19,7 @@
"skipChecks": true
},
"hooks": {
"before:init": [
"pnpm run lint",
"pnpm run build",
"git fetch --prune --prune-tags origin"
]
"before:init": ["git fetch --prune --prune-tags origin"]
},
"plugins": {
"@release-it/conventional-changelog": {
Expand Down
Loading