-
Notifications
You must be signed in to change notification settings - Fork 960
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This work adds a manually-triggered GHA workflow for creating a draft release on GitHub. Once the automated build completes successfully, a release manager should manually edit the release draft and publish it. Existing CMake- and GHA-related have been cleaned up a bit. * Remove *.sha256 file generation. * Add CMake script to extract and print project version. * Add separate workflow for releases. * "name" of check.yaml build.yaml were changed to not include "CI /" as these workflows are now reused. * "amalgamate" job moved into check.yaml as it's meant for checking/testing. * Remove headers from dev packages. * Remove lib package and rename dev to lib. * Include .* files except .git/ in source package. * Use WEBVIEW_VERSION for package version as PROJECT_VERSION doesn't include prerelease labels.
- Loading branch information
Showing
14 changed files
with
234 additions
and
150 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
File renamed without changes.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Draft Release | ||
on: | ||
workflow_dispatch: | ||
defaults: | ||
run: | ||
shell: bash | ||
concurrency: | ||
group: ${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
init: | ||
runs-on: ubuntu-22.04 | ||
outputs: | ||
gcovr-version: ${{ steps.vars.outputs.gcovr-version }} | ||
release-tag: ${{ steps.vars.outputs.release-tag }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- id: vars | ||
run: | | ||
version="$(cmake -P cmake/extract_version.cmake)" | ||
echo "gcovr-version=7.2" >> "${GITHUB_OUTPUT}" | ||
echo "release-tag=${version}" >> "${GITHUB_OUTPUT}" | ||
check: | ||
uses: ./.github/workflows/check.yaml | ||
|
||
build: | ||
needs: | ||
- check | ||
- init | ||
uses: ./.github/workflows/build.yaml | ||
with: | ||
coverage: false | ||
gcovr-version: ${{ needs.init.outputs.gcovr-version }} | ||
|
||
process-artifacts: | ||
needs: build | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Merge package artifacts | ||
uses: actions/upload-artifact/merge@v4 | ||
with: | ||
name: package | ||
pattern: package_* | ||
delete-merged: true | ||
retention-days: 1 | ||
|
||
- name: Download package artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: package | ||
path: dist | ||
|
||
- name: Create checksum file | ||
run: sha256sum * > SHA256SUMS | ||
working-directory: dist | ||
shell: bash | ||
|
||
- name: Upload checksum artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: package_checksum | ||
path: dist/*SUMS | ||
retention-days: 1 | ||
if-no-files-found: error | ||
|
||
create-github-release-draft: | ||
needs: | ||
- process-artifacts | ||
- init | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
contents: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download package artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
pattern: package* | ||
path: dist | ||
merge-multiple: true | ||
|
||
- name: List artifacts | ||
run: find dist/ | ||
|
||
- name: Verify checksums | ||
run: sha256sum --check SHA256SUMS | ||
working-directory: dist | ||
|
||
- name: Create GitHub Release | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
RELEASE_TAG: ${{ needs.init.outputs.release-tag }} | ||
run: gh release create --draft "${RELEASE_TAG}" dist/* |
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Extracts the library's version number and prints it to stdout. | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/internal.cmake") | ||
webview_extract_version() | ||
# Need this workaround because message() prints to stderr | ||
execute_process(COMMAND ${CMAKE_COMMAND} -E echo "${WEBVIEW_VERSION}") |
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
Oops, something went wrong.