ci: add CNAME to Pages #75
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 Please | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
release-please: | |
runs-on: ubuntu-latest | |
outputs: | |
release_created: ${{ steps.rp.outputs.release_created }} | |
tag_name: ${{ steps.rp.outputs.tag_name }} | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
id: rp | |
with: | |
release-type: java | |
changelog-types: '[{"type":"feat","section":"🚀 Features","hidden":false},{"type":"fix","section":"🐛 Bug Fixes","hidden":false},{"type":"docs","section":"💬 Documentation","hidden":false},{"type":"ci","section":"🦀 Build and CI","hidden":false}, {"type":"style","section":"🌈 Styling","hidden":false}]' | |
extra-files: build.gradle.kts | |
upload-jar: | |
runs-on: ubuntu-latest | |
needs: release-please | |
if: ${{ needs.release-please.outputs.release_created }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradlew | |
id: gradlew | |
with: | |
run_checks: false | |
- name: Add JAR to Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ needs.release-please.outputs.tag_name }} | |
files: ${{ steps.gradlew.outputs.jar_file }} | |
publish-maven-package: | |
runs-on: ubuntu-latest | |
needs: release-please | |
if: ${{ needs.release-please.outputs.release_created }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/gradlew | |
id: gradlew | |
with: | |
run_checks: false | |
upload_jar: false # done in the other upload-jar job! | |
- name: Publish package | |
run: ./gradlew publish | |
continue-on-error: true # TODO: understand why multiple packages are pushed | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-native: | |
needs: [ release-please, upload-jar ] | |
uses: ./.github/workflows/native_reusable.yml | |
with: | |
tag_name: ${{ needs.release-please.outputs.tag_name }} | |
update_homebrew: | |
runs-on: ubuntu-latest | |
needs: [ release-please, upload-jar ] | |
steps: | |
- name: trigger homebrew update | |
# The PAT should have actions:read-write | |
run: | | |
curl -L \ | |
-X POST \ | |
--fail-with-body \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.HOMEBREW_PAT }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/derlin/homebrew-bitdowntoc/actions/workflows/${{ secrets.HOMEBREW_WORKFLOW_ID }}/dispatches \ | |
-d '{"ref":"main","inputs":{}}' |