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
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ name: v3.x releases

on:
push:
branches:
# Pushes to the branch below will test the release workflow without
# publishing version on npm or generating new git tags
- v3.x-test
tags:
- 'v3.[0-9]+.[0-9]+'
- 'v3.[0-9]+.[0-9]+-alpha.[0-9]+'
- 'v3.[0-9]+.[0-9]+-beta.[0-9]+'
# The "test" prerelease version exist solely to validate changes on the
# release workflow. This is intended to be published
- 'v3.[0-9]+.[0-9]+-test.[0-9]+'

jobs:
debug:
Expand Down Expand Up @@ -71,6 +72,6 @@ jobs:
path: ~/.npm # this is cache where npm installs from before going out to the network
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
- run: npm install --prefer-offline
- run: ./release
- run: ./bin/release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions release → bin/release
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Get the git tag that triggered the workflow build
workflow_version=${GITHUB_REF_NAME:1} # Removed the "v" prefix
# Get version major being handled by the current workflow
workflow_major=$(echo $version | cut -d. -f1)
workflow_major=$(echo $workflow_version | cut -d. -f1)
workflow_track="latest-v${workflow_major}.x"

# Get latest version on npm registry
Expand All @@ -13,7 +13,7 @@ latest_major=$(echo $latest_version | cut -d. -f1)


# If it's a test prerelease, we just want to test the release workflow (dry run it!)
if [[ "$workflow_version" == *"-test."* ]]; then
if [[ "$workflow_version" == *"-test"* ]]; then
npm publish --tag $workflow_track --dry-run && \
exit 0
fi
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"url": "https://github.com/lquixada/cross-fetch/issues"
},
"dependencies": {
"node-fetch": "^2.6.12"
"node-fetch": "^2.6.13"
},
"devDependencies": {
"@commitlint/cli": "12.0.1",
Expand Down