EPA-81: Add getAuthorizationState and getAuthorizationList Operations… #5
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: Build and Publish package to GitHub Packages | |
on: | |
push: | |
tags: | |
- 'diga-epa-lib/v[0-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+' | |
jobs: | |
release: | |
env: | |
NAMESPACE: 'diga-epa-lib' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Get version | |
id: version | |
run: | | |
echo "parsing version from ref '$GITHUB_REF'" | |
VERSION=$(echo "$GITHUB_REF" | sed -e "s|refs/tags/$NAMESPACE/||g" | sed -E 's/v?([0-9]+)\.([0-9]+)\.([0-9]+)(-[a-zA-Z]+(\.[0-9]+)?)?/\1.\2.\3\4/g') | |
echo "version: '$VERSION'" | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
echo "ARTIFACT_ID=$NAMESPACE" >> $GITHUB_ENV | |
- name: Update Version | |
run: | | |
echo "updating version to '$VERSION'" | |
mvn -B versions:set "-DnewVersion=$VERSION" | |
- name: Publish package | |
run: mvn --batch-mode deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
permissions: | |
contents: read | |
packages: write |