diff --git a/.github/workflows/build-apps.yml b/.github/workflows/build-apps.yml index 930038027..ba1bc55ea 100644 --- a/.github/workflows/build-apps.yml +++ b/.github/workflows/build-apps.yml @@ -382,3 +382,14 @@ jobs: glob: '*' parent: false destination: 'dl.kittycad.io/releases/modeling-app/nightly' + + - name: Tag nightly commit + if: ${{ env.IS_NIGHTLY == 'true' }} + uses: actions/github-script@v7 + with: + script: | + const { VERSION } = process.env + const { owner, repo } = context.repo + const { sha } = context + const ref = `refs/tags/nightly-${VERSION}` + github.rest.git.createRef({ owner, repo, sha, ref }) diff --git a/scripts/flip-files-to-nightly.sh b/scripts/flip-files-to-nightly.sh index 7ed512e01..89f407240 100755 --- a/scripts/flip-files-to-nightly.sh +++ b/scripts/flip-files-to-nightly.sh @@ -1,6 +1,8 @@ #!/bin/bash export VERSION=$(date +'%-y.%-m.%-d') +export TAG="nightly-v$VERSION" +export PREVIOUS_TAG=$(git describe --tags --match="nightly-v[0-9]*" --abbrev=0) export COMMIT=$(git rev-parse --short HEAD) # package.json @@ -13,7 +15,7 @@ yq -i '.publish[0].url = "https://dl.zoo.dev/releases/modeling-app/nightly"' ele yq -i '.appId = "dev.zoo.modeling-app-nightly"' electron-builder.yml # Release notes -echo "Nightly build $VERSION (commit $COMMIT)" > release-notes.md +./scripts/get-nightly-changelog.sh > release-notes.md # icons cp assets/icon-nightly.png assets/icon.png diff --git a/scripts/get-nightly-changelog.sh b/scripts/get-nightly-changelog.sh new file mode 100755 index 000000000..c599f4df8 --- /dev/null +++ b/scripts/get-nightly-changelog.sh @@ -0,0 +1,5 @@ +#!/bin/bash +echo "## What's Changed" +git log ${PREVIOUS_TAG}..HEAD --oneline --pretty=format:%s | grep -v Bump | awk '{print "* "toupper(substr($0,0,1))substr($0,2)}' +echo "" +echo "**Full Changelog**: https://github.com/KittyCAD/modeling-app/compare/${PREVIOUS_TAG}...${TAG}"