Skip to content

Commit

Permalink
Muliggjør manuell release av pensjon-brevbaker-api-model (#1291)
Browse files Browse the repository at this point in the history
* Muliggjør versjonering av pensjon-brevbaker-api-model fra CLI

* Endre workflow for release av pensjon-brevbaker-api-model for manuel kjøring
  • Loading branch information
routsi authored Feb 14, 2025
1 parent eb934b2 commit 04409d6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/brevbaker-api-model.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: "Build and release pensjon-brevbaker-api-model"
on:
workflow_dispatch:
pull_request:
branches:
- "main"
Expand Down Expand Up @@ -61,7 +62,7 @@ jobs:
permissions:
packages: write
needs: [ release-common, changes ]
if: ${{ always() && (needs.release-common.result == 'success' || needs.release-common.result == 'skipped') }}
if: ${{ always() && (needs.release-common.result == 'success' || needs.release-common.result == 'skipped' || github.event_name == 'workflow_dispatch') }}
steps:
- uses: "actions/checkout@v4"
- uses: "gradle/actions/wrapper-validation@v4"
Expand All @@ -79,5 +80,10 @@ jobs:
- name: "Release maven artifact"
if: ${{ github.ref == 'refs/heads/main' && needs.changes.outputs.pensjonsbrev == 'true' }}
run: "./gradlew :pensjon-brevbaker-api-model:publish"
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: "Release maven manually"
if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main'
run: ./gradlew -Pversion="$(TZ="Europe/Oslo" date +%Y.%m.%d-%H.%M)-$(git rev-parse --short=12 HEAD)" :pensjon-brevbaker-api-model:publish
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
nodejs 20.9.0
java temurin-21.0.6+7.0.LTS
1 change: 0 additions & 1 deletion pensjon-brevbaker-api-model/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ plugins {
}

group = "no.nav.pensjon.brev"
version = "123"

java {
withSourcesJar()
Expand Down
1 change: 1 addition & 0 deletions pensjon-brevbaker-api-model/gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
version=123-SNAPSHOT

0 comments on commit 04409d6

Please sign in to comment.