Skip to content

Commit

Permalink
opprett en release for hver endring
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsteinsland committed Feb 26, 2021
1 parent 4201aae commit 43f6563
Showing 1 changed file with 28 additions and 8 deletions.
36 changes: 28 additions & 8 deletions .github/workflows/releaseGithub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,35 @@ on:

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Run Maven release
run: ./releaseGithub.sh
- name: Checkout code
uses: actions/checkout@v1
- name: Set release tag
run: |
COMMIT_COUNT=$(git rev-list --all --count)
TAG_NAME="$(echo $GITHUB_SHA | cut -c1-7)"
echo "RELEASE_TAG="${COMMIT_COUNT}.${TAG_NAME}" >> $GITHUB_ENV
- name: Set 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")"
text="${text//$'%'/%25}"
text="${text//$'\n'/%0A}"
text="${text//$'\r'/%0D}"
echo "CHANGELOG=$text" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_PUBLISH_TOKEN: ${{ secrets.GITHUB_PUBLISH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.RELEASE_TAG }}
release_name: ${{ env.RELEASE_TAG }}
body: |
Changes in this Release
${{ env.CHANGELOG }}
draft: false
prerelease: false

0 comments on commit 43f6563

Please sign in to comment.