Skip to content

Remove annotations and change model classes to use @Data #503

Remove annotations and change model classes to use @Data

Remove annotations and change model classes to use @Data #503

Workflow file for this run

name: Release
on:
push:
branches:
- master
paths:
- libs/**
jobs:
release:
name: Release libs
permissions:
contents: write
packages: write
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Fetch git history"
run: git fetch --unshallow
- name: "Java"
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 21
- name: "Setup"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo Release started by $GITHUB_ACTOR
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git
git config --global user.email "[email protected]"
git config --global user.name "$GITHUB_ACTOR"
- name: "Create version"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TIME=$(TZ="Europe/Oslo" date +%Y.%m.%d-%H.%M)
COMMIT=$(git rev-parse --short=12 HEAD)
export VERSION="$TIME-$COMMIT"
echo Set version=$VERSION
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: "Release avro-schema"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :avro-schema:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release data-transfer-objects"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :data-transfer-objects:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release reactive-core"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :reactive-core:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release reactive-proxy"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :reactive-proxy:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release reactive-security"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :reactive-security:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Release reactive-frontend"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
uses: gradle/gradle-build-action@v2
with:
arguments: :reactive-frontend:publish -PreleaseVersion=${{ env.VERSION }}
- name: "Git tag og push"
env:
NAV_TOKEN: ${{ secrets.NAV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git tag -a ${{ env.VERSION }} -m "Tag release version"
git push origin ${{ env.VERSION }}