release on commit #44
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
name: release on commit | |
on: | |
workflow_run: | |
workflows: ["check build"] | |
types: [completed] | |
jobs: | |
build-schemes: | |
runs-on: ubuntu-22.04 | |
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'master' }} | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Get version | |
shell: bash | |
run: | | |
export RELEASE_VERSION=$(cat version.txt).$GITHUB_RUN_NUMBER | |
echo "version=$RELEASE_VERSION">> $GITHUB_ENV | |
sed -i "s/\[Unreleased\]/\[$RELEASE_VERSION\]/g" CHANGELOG.md | |
- name: Build packed schemes | |
working-directory: ${{runner.workspace}}/Colorer-schemes | |
run: ./build.sh base.distr-packed -Dpostfix=${{ env.version }} | |
- name: Build unpacked schemes | |
working-directory: ${{runner.workspace}}/Colorer-schemes | |
run: ./build.sh base.distr-unpacked -Dpostfix=${{ env.version }} | |
- name: Build allpacked schemes | |
working-directory: ${{runner.workspace}}/Colorer-schemes | |
run: ./build.sh base.distr-allpacked -Dpostfix=${{ env.version }} | |
- name: Create release | |
run: gh release create v${{ env.version }} -t "v${{ env.version }}" ./build/*.zip -n "Colorer base ${{ env.version }}" | |
env: | |
GITHUB_TOKEN: ${{secrets.PACKAGES_GITHUB_TOKEN}} |