Skip to content

Oppgradere gradle

Oppgradere gradle #235

Workflow file for this run

name: Build and deploy
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- uses: gradle/gradle-build-action@v2
with:
arguments: build
release:
name: Create Release
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && !contains(github.event.head_commit.message, 'ci skip')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set release tag
run: |
export TAG_NAME="$(TZ="Europe/Oslo" date +%Y.%m.%d-%H.%M).$(echo $GITHUB_SHA | cut -c 1-12)"
echo "RELEASE_TAG=$TAG_NAME" >> $GITHUB_ENV
- name: Set changelog
id: changelog
# (Escape newlines see https://github.com/actions/create-release/issues/25)
run: |
text="$(git --no-pager log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%h %s")"
echo "::set-output name=CHANGELOG::$text"
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: ${{ env.RELEASE_TAG }}
body: |
Changes in this Release
${{ steps.changelog.outputs.CHANGELOG }}"
draft: false
prerelease: false