Skip to content

Endring i byggescript #7

Endring i byggescript

Endring i byggescript #7

name: Publish Snapshot
on:
push:
branches:
- dev/**
jobs:
publish-snapshot:
env:
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: gradle
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Ensure Gradle Wrapper is Downloaded
run: ./gradlew --version
- name: Get Version
run: echo "CURRENT_VERSION=$(./gradlew :printVersion --quiet)" >> $GITHUB_ENV
- name: Print Project Version
run: echo "Project version is ${{ env.CURRENT_VERSION }}"
- name: Publish artifact
if: ${{ endsWith(env.CURRENT_VERSION, '-SNAPSHOT') }}
run: ./gradlew publish