forked from maplibre/maplibre-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
try to move release notes to higher depth checkout
- Loading branch information
Showing
1 changed file
with
66 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,8 +33,73 @@ jobs: | |
outputs: | ||
published: ${{ steps.check.outputs.published }} | ||
|
||
github_release: | ||
name: Create Github Release with Notes | ||
needs: release-github | ||
if: ${{ needs.release-check.outputs.published == 'false' }} | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Use Node.js from nvmrc | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Get version | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
|
||
- name: npm ci | ||
run: npm ci --ignore-scripts | ||
|
||
- name: Prepare release | ||
id: prepare_release | ||
run: | | ||
RELEASE_TYPE="$(node -e "console.log(require('semver').prerelease('${{ steps.package-version.outputs.current-version }}') ? 'prerelease' : 'regular')")" | ||
echo "release_type=$RELEASE_TYPE" >> $GITHUB_OUTPUT | ||
- name: Build Release Notes | ||
id: release_notes | ||
if: ${{ steps.prepare_release.outputs.release_type == 'regular' }} | ||
run: | | ||
RELEASE_NOTES_PATH="${PWD}/release_notes.txt" | ||
./scripts/release-notes-node.js > ${RELEASE_NOTES_PATH} | ||
echo "release_notes=${RELEASE_NOTES_PATH}" >> $GITHUB_OUTPUT | ||
- name: Create GitHub Release (regular) | ||
id: create_regular_release | ||
if: ${{ steps.prepare_release.outputs.release_type == 'regular' }} | ||
uses: ncipollo/release-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: node_v${{ steps.package-version.outputs.current-version }} | ||
name: node_v${{ steps.package-version.outputs.current-version }} | ||
bodyFile: ${{ steps.release_notes.outputs.release_notes }} | ||
allowUpdates: true | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Create GitHub Release (prerelease) | ||
id: create_prerelease | ||
if: ${{ steps.prepare_release.outputs.release_type == 'prerelease' }} | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: node_v${{ steps.package-version.outputs.current-version }} | ||
name: node_v${{ steps.package-version.outputs.current-version }} | ||
draft: false | ||
prerelease: true | ||
|
||
publish_binaries: | ||
needs: release-check | ||
needs: [release-check, release-github] | ||
if: ${{ needs.release-check.outputs.published == 'false' }} | ||
runs-on: ${{ matrix.runs-on }} | ||
strategy: | ||
|
@@ -266,28 +331,6 @@ jobs: | |
RELEASE_TYPE="$(node -e "console.log(require('semver').prerelease('${{ steps.package-version.outputs.current-version }}') ? 'prerelease' : 'regular')")" | ||
echo "release_type=$RELEASE_TYPE" >> $GITHUB_OUTPUT | ||
- name: Build Release Notes | ||
id: release_notes | ||
if: ${{ steps.prepare_release.outputs.release_type == 'regular' }} | ||
run: | | ||
RELEASE_NOTES_PATH="${PWD}/release_notes.txt" | ||
./scripts/release-notes-node.js > ${RELEASE_NOTES_PATH} | ||
echo "release_notes=${RELEASE_NOTES_PATH}" >> $GITHUB_OUTPUT | ||
- name: Update Release Notes (release) | ||
id: create_regular_release | ||
if: ${{ steps.prepare_release.outputs.release_type == 'regular' }} | ||
uses: ncipollo/release-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: node_v${{ steps.package-version.outputs.current-version }} | ||
name: node_v${{ steps.package-version.outputs.current-version }} | ||
bodyFile: ${{ steps.release_notes.outputs.release_notes }} | ||
allowUpdates: true | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Publish to NPM (release) | ||
if: ${{ steps.prepare_release.outputs.release_type == 'regular' }} | ||
run: | | ||
|