Skip to content

Mtags auto release #2090

Mtags auto release

Mtags auto release #2090

name: "Mtags auto release"
on:
workflow_dispatch:
inputs:
scala_version:
description: "Scala Version"
required: true
metals_version:
description: "Metals Version"
required: true
default: "v1.0.1"
metals_ref:
description: "Tag/branch-name from which run release"
required: true
# If you update this line after release
# just put the tag name (`v*.*.*`) here as in `metals_version.value` above.
# Don't be confused if this value contains `*.*.*_mtags_release`
default: "v1.0.1"
jobs:
test_and_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.inputs.metals_ref }}
token: ${{ secrets.PUSH_TAG_GH_TOKEN }}
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
cache: 'sbt'
- name: "Test and push tag"
run: |
sbt 'test-mtags-dyn ${{ github.event.inputs.scala_version }}'
if [ $? == 0 ]; then
git config --global user.name "Metals/Github Actions"
git config --global user.email "[email protected]"
git commit --allow-empty -m "Release mtags-${{ github.event.inputs.scala_version }} for ${{github.event.inputs.metals_version}}"
TAG_NAME="mtags_${{ github.event.inputs.metals_version }}_${{ github.event.inputs.scala_version }}"
git tag $TAG_NAME
git push --no-verify origin $TAG_NAME
fi
env:
GIT_USER: [email protected]