Merge pull request #196 from wttech/bundle-context-issues-in-hc #97
Workflow file for this run
This file contains hidden or 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 | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| packages: write | |
| actions: write | |
| steps: | |
| - name: Extract Version | |
| id: extract_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
| - name: Checkout Code | |
| uses: actions/checkout@v4 | |
| # https://central.sonatype.org/publish/requirements/#sign-files-with-gpgpgp | |
| - name: Import GPG Key | |
| uses: crazy-max/ghaction-import-gpg@v5 | |
| with: | |
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | |
| passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 8 | |
| distribution: temurin | |
| # https://central.sonatype.org/publish/publish-portal-maven/#credentials | |
| - name: Setup Maven Settings | |
| uses: s4u/maven-settings-action@v2 | |
| with: | |
| servers: | | |
| [ | |
| { | |
| "id": "central", | |
| "username": "${{ secrets.OSSRH_USERNAME }}", | |
| "password": "${{ secrets.OSSRH_PASSWORD }}" | |
| } | |
| ] | |
| - name: Setup Maven Cache | |
| uses: actions/cache@v3 | |
| if: always() | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Build & Deploy with Maven | |
| run: sh mvnw -B deploy -Prelease -Drevision=${{ env.VERSION }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create GitHub Release with Assets | |
| run: | | |
| gh release create ${{ env.VERSION }} \ | |
| --title "${{ env.VERSION }}" \ | |
| --draft=false \ | |
| --prerelease=false \ | |
| --generate-notes \ | |
| all/target/acm.all-${{ env.VERSION }}.zip \ | |
| min/target/acm.min-${{ env.VERSION }}.zip \ | |
| ui.content.example/target/acm.ui.content.example-${{ env.VERSION }}.zip \ | |
| core/target/acm.core-${{ env.VERSION }}.jar \ | |
| core/target/acm.core-${{ env.VERSION }}-javadoc.jar \ | |
| core/target/acm.core-${{ env.VERSION }}-sources.jar | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |