diff --git a/.github/workflows/release-brew.yml b/.github/workflows/release-brew.yml index 27db7c1..4c8f4f6 100644 --- a/.github/workflows/release-brew.yml +++ b/.github/workflows/release-brew.yml @@ -1,14 +1,10 @@ name: Release to Homebrew on: - push: - branches: [ "main" ] - tags: - - '*' workflow_dispatch: jobs: - bump: + build-and-release: runs-on: macos-latest steps: - name: Checkout repo diff --git a/.github/workflows/release-snap.yml b/.github/workflows/release-snap.yml index 522d437..21a647d 100644 --- a/.github/workflows/release-snap.yml +++ b/.github/workflows/release-snap.yml @@ -1,8 +1,6 @@ name: Build and Release Snap on: - push: - branches: [ "main" ] workflow_dispatch: jobs: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..ebe0ab6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: build and publish + +on: + push: + tags: + - '*' + +env: + GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false" + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: ./.github/workflows/check-gradle-wrapper.yml + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v3 + + - name: Build with Gradle + run: ./gradlew assemble + + - name: Extract release notes + id: release_notes + if: startsWith(github.ref, 'refs/tags/') + uses: ffurrer2/extract-release-notes@v2 + + - uses: ./.github/workflows/release-brew.yml + + - uses: ./.github/workflows/release-snap.yml + + - name: Create Release + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + body: ${{ steps.release_notes.outputs.release_notes }} + files: build/bin/**/**/dogcat.kexe + draft: false + prerelease: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file