Publish artifacts #10
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 artifacts | |
on: | |
release: | |
types: [published] | |
env: | |
VERSION: ${{ github.event.release.tag_name }} | |
permissions: | |
contents: "write" | |
id-token: "write" | |
packages: "write" | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'temurin' | |
cache: 'maven' | |
# - name: Resolve/Update Dependencies | |
# run: mvn package dependency:resolve-plugins dependency:go-offline | |
# - name: Build (and run tests) | |
# run: mvn clean install | |
- name: Setting version | |
run: | | |
mvn versions:set -DnewVersion="${{ env.VERSION }}" | |
mvn versions:commit | |
- name: Deploy to Github Package | |
env: | |
GITHUB_USERNAME: x-access-token | |
GITHUB_PASSWORD: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
echo "Release package with version ${{ env.VERSION }}" | |
mvn --settings .github/.m2/maven-settings.xml source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false -Dmaven.source.includePom=true -DdeplyAtEnd=true |