Compare commits

...

4 Commits

View File

@ -5,6 +5,7 @@ on:
push:
branches:
- main
- pierremtb/fix-nightly-release-notes
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
schedule:
@ -14,7 +15,8 @@ on:
env:
IS_RELEASE: ${{ github.ref_type == 'tag' }}
IS_NIGHTLY: ${{ github.event_name == 'schedule' }}
# IS_NIGHTLY: ${{ github.event_name == 'schedule' }}
IS_NIGHTLY: true
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@ -47,6 +49,12 @@ jobs:
- name: Run build:wasm
run: "yarn build:wasm"
- name: Fetch previous nightly tags
# Note: prefered going this way instead of a full clone in the checkout step,
# see https://github.com/actions/checkout/issues/1471
if: ${{ env.IS_NIGHTLY == 'true' }}
run: git fetch --prune --unshallow --tags
- name: Set nightly version, product name, release notes, and icons
if: ${{ env.IS_NIGHTLY == 'true' }}
run: yarn files:flip-to-nightly
@ -72,7 +80,10 @@ jobs:
run: echo "version=`cat package.json | jq -r '.version'`" >> "$GITHUB_OUTPUT"
- id: export_notes
run: echo "notes=`cat release-notes.md`" >> "$GITHUB_OUTPUT"
run: |
output="$(cat release-notes.md)"
echo $output
echo "notes=$output" >> "$GITHUB_OUTPUT"
- name: Prepare electron-builder.yml file for updater test
if: ${{ env.IS_RELEASE == 'true' }}
@ -256,7 +267,7 @@ jobs:
runs-on: ubuntu-22.04
permissions:
contents: write
if: ${{ github.ref_type == 'tag' || github.event_name == 'schedule' }}
# if: ${{ github.ref_type == 'tag' || github.event_name == 'schedule' }}
env:
VERSION_NO_V: ${{ needs.prepare-files.outputs.version }}
VERSION: ${{ format('v{0}', needs.prepare-files.outputs.version) }}
@ -313,8 +324,10 @@ jobs:
env:
NOTES: ${{ needs.prepare-files.outputs.notes }}
PUB_DATE: ${{ github.event.repository.updated_at }}
WEBSITE_DIR: ${{ github.event_name == 'schedule' && 'dl.zoo.dev/releases/modeling-app/nightly' || 'dl.zoo.dev/releases/modeling-app' }}
URL_CODED_NAME: ${{ github.event_name == 'schedule' && 'Zoo%20Modeling%20App%20%28Nightly%29' || 'Zoo%20Modeling%20App' }}
# WEBSITE_DIR: ${{ github.event_name == 'schedule' && 'dl.zoo.dev/releases/modeling-app/nightly' || 'dl.zoo.dev/releases/modeling-app' }}
WEBSITE_DIR: ${{ 'dl.zoo.dev/releases/modeling-app/nightly' }}
# URL_CODED_NAME: ${{ github.event_name == 'schedule' && 'Zoo%20Modeling%20App%20%28Nightly%29' || 'Zoo%20Modeling%20App' }}
URL_CODED_NAME: ${{ 'Zoo%20Modeling%20App%20%28Nightly%29' }}
run: |
RELEASE_DIR=https://${WEBSITE_DIR}
jq --null-input \