Workflow file for this run
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: Publish to GitHub Packages | |
on: | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') # only allow publishing tagged versions | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 22 | |
distribution: 'zulu' | |
cache: 'maven' | |
- name: Enforce project version ${{ github.event.release.tag_name }} | |
run: mvn versions:set -B -DnewVersion=${{ github.event.release.tag_name }} | |
- name: Deploy | |
run: mvn deploy -B -DskipTests -Psign,deploy-github --no-transfer-progress | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MAVEN_GPG_PASSPHRASE: ${{ secrets.RELEASES_GPG_PASSPHRASE }} | |
MAVEN_GPG_KEY: ${{ secrets.RELEASES_GPG_PRIVATE_KEY }} # Value of the GPG private key to import | |
MAVEN_GPG_KEY_FINGERPRINT: "58117AFA1F85B3EEC154677D615D449FE6E6A235" | |
- name: Slack Notification | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }} | |
SLACK_USERNAME: 'Cryptobot' | |
SLACK_ICON: | |
SLACK_ICON_EMOJI: ':bot:' | |
SLACK_CHANNEL: 'cryptomator-desktop' | |
SLACK_TITLE: "Published ${{ github.event.repository.name }} ${{ github.event.release.tag_name }}" | |
SLACK_MESSAGE: "Ready to <https://github.com/${{ github.repository }}/actions/workflows/publish-central.yml|deploy to Maven Central>." | |
SLACK_FOOTER: | |
MSG_MINIMAL: true |