Skip to content

Commit

Permalink
Adds automatic release after successful build
Browse files Browse the repository at this point in the history
  • Loading branch information
jerefrer committed Jan 31, 2025
1 parent 4ca0ddb commit 2e3bdd8
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:

runs-on: ${{ matrix.os }}

outputs:
artifact_paths: ${{ steps.collect_artifacts.join(', ') }}

steps:
- name: Set required env vars (Unix)
if: runner.os == 'macOS'
Expand Down Expand Up @@ -223,15 +226,40 @@ jobs:
--windows-icon-from-ico=logo.ico `
--company-name="Buddhist Digital Resource Center" `
--product-name="Tibetan OCR App" `
--file-version='${{ env.VERSION }}' `
--product-version='${{ env.VERSION }}' `
--file-version=${{ env.VERSION }} `
--product-version=${{ env.VERSION }} `
--include-data-dir=./Assets=Assets `
--include-data-dir=./Models=Models `
main.py
- name: Upload artifact
uses: actions/upload-artifact@v4
id: upload
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_PATH }}
compression-level: 0

- name: Collect artifact path
id: collect_artifacts
run: echo "::set-output name=path::${{ steps.upload.outputs.artifact-path }}"

create-release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: artifacts

- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
files: artifacts/**/*

0 comments on commit 2e3bdd8

Please sign in to comment.