cleanup/vault_autoconfigured (#3766) #595
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: 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@v4 | |
- name: "Fetch git history" | |
run: git fetch --unshallow | |
- name: "Java" | |
uses: actions/setup-java@v4 | |
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:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git | |
git config --global user.email "dolly@nav.no" | |
git config --global user.name "$GITHUB_ACTOR" | |
- name: "Gradle" | |
uses: gradle/actions/setup-gradle@v3 | |
- 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 }} | |
run: ./gradlew :avro-schema:publish -PreleaseVersion=${{ env.VERSION }} | |
- name: "Release data-transfer-objects" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
run: ./gradlew :data-transfer-objects:publish -PreleaseVersion=${{ env.VERSION }} | |
- name: "Release reactive-core" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
run: ./gradlew :reactive-core:publish -PreleaseVersion=${{ env.VERSION }} | |
- name: "Release reactive-proxy" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
run: ./gradlew :reactive-proxy:publish -PreleaseVersion=${{ env.VERSION }} | |
- name: "Release reactive-security" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
run: ./gradlew :reactive-security:publish -PreleaseVersion=${{ env.VERSION }} | |
- name: "Release reactive-frontend" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
run: ./gradlew :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 }} |