GH action aurora-delete-database incorrectly sets environment variabl… #137
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: Snapshot Release | |
on: | |
push: | |
branches: | |
- main | |
- '*-release' | |
paths-ignore: | |
- 'provision/**' | |
- 'antora/**' | |
- 'doc/**' | |
- '.github/workflows/*.yml' | |
- '!.github/workflows/snapshot.yml' | |
concurrency: | |
# Only run once for latest commit per ref and cancel other (previous) runs. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Publish binaries | |
runs-on: ubuntu-latest | |
# publishing can only happen on the main repository, not in forks | |
if: github.repository == 'keycloak/keycloak-benchmark' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'maven' | |
- name: Cache Maven Wrapper | |
uses: actions/cache@v4 | |
with: | |
path: | | |
.mvn/wrapper/maven-wrapper.jar | |
key: ${{ runner.os }}-maven-wrapper-${{ hashFiles('**/maven-wrapper.properties') }} | |
restore-keys: | | |
${{ runner.os }}-maven-wrapper- | |
- name: Build | |
run: | |
./mvnw -B clean install | |
- name: Set version | |
id: get_version | |
run: echo VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec) >> $GITHUB_OUTPUT | |
- name: Delete existing release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
if ( gh release view ${{ steps.get_version.outputs.VERSION }} --repo ${{ github.repository_owner }}/${{ github.event.repository.name }} &> /dev/null ); then | |
gh release delete ${{ steps.get_version.outputs.VERSION }} --repo ${{ github.repository_owner }}/${{ github.event.repository.name }} --yes | |
git push --delete origin ${{ steps.get_version.outputs.VERSION }} | |
fi | |
- name: Create Release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
id: create_release | |
run: > | |
gh release create ${{ steps.get_version.outputs.VERSION }} | |
--target ${{ github.ref }} | |
--title 'Keycloak Benchmark ${{ steps.get_version.outputs.VERSION }}' | |
--notes 'Latest version built from the `${{ github.ref_name }}` branch.' | |
--prerelease | |
./dataset/target/keycloak-benchmark-dataset-${{ steps.get_version.outputs.VERSION }}.jar | |
./benchmark/target/keycloak-benchmark-${{ steps.get_version.outputs.VERSION }}.zip | |
./benchmark/target/keycloak-benchmark-${{ steps.get_version.outputs.VERSION }}.tar.gz | |