Skip to content

release

release #56

Workflow file for this run

name: release
on:
workflow_dispatch:
jobs:
dockerPublish:
uses: ./.github/workflows/docker.yml
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
release:
needs: dockerPublish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Set GitHub user
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
- uses: sbt/setup-sbt@v1
- name: Release
run: sbt "release with-defaults"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
githubRelease:
needs: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set GitHub user
run: |
git config --global user.name 'oat9002'
git config --global user.email 'oat9002@hotmail.com'
- name: Get latest tag
run: |
git pull
echo ::set-output name=LATEST_TAG::$(git describe --tags --abbrev=0)
id: get-latest-tag
- name: Checkout to latest tag
run: git checkout tags/${{ steps.get-latest-tag.outputs.LATEST_TAG }}
- name: Publish GitHub Release
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ steps.get-latest-tag.outputs.LATEST_TAG }}