Fiks ytelseVedtak_v1 wsdl file #5
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: Deploy artifact | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**.md' | |
- 'LICENCE' | |
- 'CODEOWNERS' | |
- '.gitignore' | |
- '.github/workflows/build-branch.yaml' | |
- '.github/dependabot.yaml' | |
env: | |
TZ: Europe/Oslo | |
permissions: | |
contents: "read" | |
id-token: "write" | |
packages: "write" | |
jobs: | |
build-deploy-artifact: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
id: setup-java | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
cache: 'maven' | |
- uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.8.7 | |
- name: Resolve/Update Dependencies | |
env: | |
GITHUB_USERNAME: x-access-token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn package dependency:resolve-plugins dependency:go-offline | |
- name: Build (and run tests) | |
if: steps.setup-java.outputs.cache-hit != 'true' | |
run: mvn clean install | |
- name: Setting version | |
run: | | |
export GIT_COMMIT_HASH=$(git log -n 1 --pretty=format:'%h') | |
export GIT_COMMIT_DATE=$(git log -1 --pretty='%ad' --date=format:'%Y%m%d%H%M%S') | |
export VERSION=1.0_${GIT_COMMIT_DATE}_${GIT_COMMIT_HASH} | |
echo "Setting version $VERSION" | |
mvn versions:set -DnewVersion="$VERSION" | |
mvn versions:commit | |
- name: Deploy to Github Package | |
env: | |
GITHUB_USERNAME: x-access-token | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn --settings .github/maven-settings.xml source:jar-no-fork deploy -DskipTests=true -Dmaven.wagon.http.pool=false |