Skip to content

Commit 796c76b

Browse files
committed
Generate an edge release when stable releases are created.
1 parent d67ada7 commit 796c76b

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

.github/workflows/release.yml

+15-7
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@ jobs:
1111
runs-on: ${{ matrix.os }}
1212
env:
1313
TERM: xterm
14-
PRERELEASE_TAG: edge
1514
strategy:
1615
matrix:
1716
os:
1817
- ubuntu-24.04
1918
node-version:
20-
- '18'
19+
- '20'
2120
steps:
2221
# Install deps and cache
2322
- name: Checkout code
@@ -28,7 +27,7 @@ jobs:
2827
node-version: ${{ matrix.node-version }}
2928
registry-url: https://registry.npmjs.org
3029
cache: npm
31-
- name: Install NPM dependencies
30+
- name: Install dependencies
3231
run: npm clean-install --prefer-offline --frozen-lockfile
3332

3433
# Let's do tests rq just to make sure we dont push something that is fundamentally broken
@@ -49,14 +48,23 @@ jobs:
4948
# Deploy
5049
- name: Publish to npm
5150
run: |
51+
VERSION=$(node -p "require('./package.json').version")
52+
PACKAGE=$(node -p "require('./package.json').name")
53+
5254
if [ "${{ github.event.release.prerelease }}" == "false" ]; then
5355
npm publish --access public --dry-run
5456
npm publish --access public
55-
echo "::notice title=Published ${{ github.ref_name }} to @${{ github.repository }}::This is a stable release published to the default 'latest' npm tag"
57+
npm dist-tag add "$PACKAGE@$VERSION" edge
58+
59+
echo "::notice title=Published $VERSION to $PACKAGE::This is a stable release published to the default 'latest' npm tag"
60+
echo "::notice title=Updated latest tag to $VERSION::The stable tag now points to $VERSION"
61+
echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION"
5662
else
57-
npm publish --access public --tag ${{ env.PRERELEASE_TAG }} --dry-run
58-
npm publish --access public --tag ${{ env.PRERELEASE_TAG }}
59-
echo "::notice title=Published ${{ github.ref_name }} to @${{ github.repository }}@${{ env.PRERELEASE_TAG }}::This is a pre-release published to the '${{ env.PRERELEASE_TAG }}' npm tag"
63+
npm publish --access public --tag edge --dry-run
64+
npm publish --access public --tag edge
65+
66+
echo "::notice title=Published $VERSION to $PACKAGE::This is a prerelease published to the 'edge' npm tag"
67+
echo "::notice title=Updated edge tag to $VERSION::The edge tag now points to $VERSION"
6068
fi
6169
env:
6270
NODE_AUTH_TOKEN: ${{secrets.NPM_DEPLOY_TOKEN}}

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## {{ UNRELEASED_VERSION }} - [{{ UNRELEASED_DATE }}]({{ UNRELEASED_LINK }})
22

3+
* Updated release process to generate an edge release when stable releases are created.
4+
35
* Removed unnecessary dependency lando/nginx.
46

57
## v1.7.1 - [October 19, 2024](https://github.com/lando/laravel/releases/tag/v1.7.1)

0 commit comments

Comments
 (0)