-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add workflow draft for generating new releases on tag
- Loading branch information
1 parent
58a84ea
commit c50b323
Showing
1 changed file
with
66 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: New release from tag | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
- 'v*.*.*-*' | ||
|
||
jobs: | ||
create-psibase-release: | ||
steps: | ||
- name: "Build Changelog" | ||
id: build_changelog | ||
uses: mikepenz/release-changelog-builder-action@v4 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Psibase | ||
id: build_psibase | ||
uses: ./.github/workflows/ubuntu-builder.yml | ||
#secrets: | ||
#token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Download build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
path: artifacts/ | ||
|
||
- name: <Debug> Display structure of downloaded files | ||
run: ls -R | ||
|
||
- name: Create new Github Release | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
artifacts/psidk-ubuntu-2004.tar.gz | ||
artifacts/psidk-book-2004.tar.gz | ||
artifacts/psidk-ubuntu-2204.tar.gz | ||
artifacts/psidk-book-2204.tar.gz | ||
draft: true | ||
# TODO: Split up the create release into a separate job, and then conditionally set | ||
# prerelease value based on whether the triggering tag is a prerelease | ||
prerelease: true | ||
release_name: ${{ github.ref_name }} | ||
tag_name: ${{ github.ref }} | ||
body_path: ${{ steps.build_changelog.outputs.changelog }} | ||
# note you'll typically need to create a personal access token | ||
# with permissions to create releases in the other repo | ||
#token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
build-new-CLI-versions: | ||
name: Build new CLI version | ||
needs: create-psibase-release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- env: | ||
GITHUB_TOKEN: ${{ secrets.WORKFLOW_DISPATCHER_TOKEN }} | ||
run: | | ||
version=${{ github.ref_name }} | ||
gh workflow run cli.yml -f version=$version -R ${{ github.repository_owner }}/image-builders | ||
# TODO: I think the psinode image is still taking the executable from psidk binaries. | ||
# Ideally we should take the artifacts from a release, with new uploaded artifacts. |