From f6f8868f124fffbe36d5123f6c67e95ae9304aa9 Mon Sep 17 00:00:00 2001 From: cosmin-marginean Date: Sat, 27 Apr 2024 17:35:46 +0100 Subject: [PATCH] Add release hooks --- .github/FUNDING.yml | 3 +++ .github/github-release-from-tag.yml | 4 ++++ .github/workflows/release.yml | 18 ++++++++++++++++++ Makefile | 6 ++++++ 4 files changed, 31 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/github-release-from-tag.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..4fe05b1 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,3 @@ +# These are supported funding model platforms + +github: cosmin-marginean diff --git a/.github/github-release-from-tag.yml b/.github/github-release-from-tag.yml new file mode 100644 index 0000000..b27337b --- /dev/null +++ b/.github/github-release-from-tag.yml @@ -0,0 +1,4 @@ +draft: false +generateReleaseNotes: false +prerelease: false +reactions: [] \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..26c06fc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Publish release + +on: + push: + tags: + - "v*" + +jobs: + publish: + name: Publish release + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Publish release + uses: ghalactic/github-release-from-tag@v4 diff --git a/Makefile b/Makefile index 5e32851..e799d02 100644 --- a/Makefile +++ b/Makefile @@ -15,3 +15,9 @@ publish: publish-local: ./gradlew publish -x initializeSonatypeStagingRepository -x publishMavenJavaPublicationToSonatypeRepository + +release: + @echo $(invirtVersion) + git tag "v$(invirtVersion)" -m "Release v$(invirtVersion)" + git push --tags --force + @echo Finished building version $(invirtVersion)