release #46
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: | |
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@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
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' | |
- name: Release | |
run: sbt "release with-defaults" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
githubRelease: | |
needs: release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 }} | |
# | |
# deploy: | |
# needs: dockerPublish | |
# runs-on: ubuntu-latest | |
# steps: | |
# - uses: actions/checkout@v3 | |
# - name: Deploy to server | |
# run: | | |
# curl ${{ secrets.SERVER_URL }} -H "X-Api-Key: ${{ secrets.DEPLOY_API_KEY }}" | |