Skip to content

Commit

Permalink
add workflow draft for generating new releases on tag
Browse files Browse the repository at this point in the history
  • Loading branch information
James-Mart committed Aug 14, 2023
1 parent 58a84ea commit c50b323
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/on-tag.yml
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.

0 comments on commit c50b323

Please sign in to comment.