Skip to content

add workflow to generate releases on tag #1

add workflow to generate releases on tag

add workflow to generate releases on tag #1

Workflow file for this run

name: On Tag - Release

Check failure on line 1 in .github/workflows/on-tag.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/on-tag.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: debug-print, prerelease-check
on:
push:
tags:
- 'v*.*.*'
- 'v*.*.*-*'
jobs:
debug-print:
name: <Debug> Branch/tag - ${{github.ref}}
build-psibase:
name: Run Builds
uses: ./.github/workflows/ubuntu-builder.yml
prerelease-check:
name: Prerelease Check
runs-on: ubuntu-latest
outputs:
prerelease: ${{ steps.set-variable.outputs.prerelease }}
shell: bash
run: |
if [[ ${{ github.ref_name }} == *-* ]]; then
echo prerelease=true >>$GITHUB_OUTPUT
else
echo prerelease=false >>$GITHUB_OUTPUT
fi
create-psibase-release:
name: Create Psibase Release
needs:
- build-psibase
- prerelease-check
steps:
- name: "Build Changelog"
id: build_changelog
uses: mikepenz/release-changelog-builder-action@v4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Download build artifacts
uses: actions/download-artifact@v3
- 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: |
psidk-ubuntu-2004.tar.gz
psidk-book-2004.tar.gz
psidk-ubuntu-2204.tar.gz
psidk-book-2204.tar.gz
draft: true # TODO: Change to false
prerelease: ${{needs.prerelease-check.outputs.prerelease}}
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: Psinode image is still taking the binaries from rolling-release. Needs to be changed to
# Download the artifacts from the release that I just uploaded to.