Merge pull request #102 from matheus-corregiari/release/1.8.0 #42
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: Generate Release Tag and Publish Artifacts | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
# Generates a new tag and submit it into repository <3 | |
generate-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate next tag | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
chmod +x .github/scripts/tag.sh | |
./.github/scripts/tag.sh | |
# Prepare the field to init publishing stuff | |
pre-build: | |
runs-on: ubuntu-latest | |
outputs: | |
modules: ${{ steps.publishing-modules.outputs.modules }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Base Setup | |
uses: ./.github/actions/setup-gradle | |
- name: List of Modules | |
id: publishing-modules | |
uses: ./.github/actions/publishing-modules | |
# Publishes everything ^^ | |
publish: | |
runs-on: ubuntu-latest | |
needs: | |
- generate-tag | |
- pre-build | |
strategy: | |
matrix: | |
module: ${{fromJSON(needs.pre-build.outputs.modules)}} | |
fail-fast: true | |
max-parallel: 1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Base Setup | |
uses: ./.github/actions/setup-gradle | |
- name: Version Name | |
uses: ./.github/actions/version-name | |
with: | |
# Sonatype Credentials | |
ossrh_username: ${{ secrets.OSSRH_USERNAME }} | |
ossrh_password: ${{ secrets.OSSRH_PASSWORD }} | |
# Sign Credentials | |
sign_keyid: ${{ secrets.SIGN_KEYID }} | |
sign_password: ${{ secrets.SIGN_PASSWORD }} | |
sign_filename: ${{ secrets.SIGN_FILENAME }} | |
- name: Build ${{ matrix.module }} | |
run: ./gradlew :${{ matrix.module }}:assembleRelease | |
- name: Publish ${{ matrix.module }} | |
run: ./gradlew :${{ matrix.module }}:publishToolkitPublicationToSonatypeRepository |