Skip to content

Commit

Permalink
Ensure that no draft releases are created
Browse files Browse the repository at this point in the history
Closes #691

Signed-off-by: Alexander Schwartz <[email protected]>
  • Loading branch information
ahus1 committed Mar 7, 2024
1 parent 69013fc commit a293138
Showing 1 changed file with 13 additions and 38 deletions.
51 changes: 13 additions & 38 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
${{ runner.os }}-maven-wrapper-
- name: Build
run:
mvn clean install
./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
Expand All @@ -55,41 +55,16 @@ jobs:
git push --delete origin ${{ steps.get_version.outputs.VERSION }}
fi
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_version.outputs.VERSION }}
release_name: Keycloak Benchmark ${{ steps.get_version.outputs.VERSION }}
draft: false
prerelease: true
body: |
Latest version built from the `${{ github.ref_name }}` branch.
- name: Publish dataset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dataset/target/keycloak-benchmark-dataset-${{ steps.get_version.outputs.VERSION }}.jar
asset_name: keycloak-benchmark-dataset-${{ steps.get_version.outputs.VERSION }}.jar
asset_content_type: application/gzip
- name: Publish kcb ZIP
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./benchmark/target/keycloak-benchmark-${{ steps.get_version.outputs.VERSION }}.zip
asset_name: keycloak-benchmark-${{ steps.get_version.outputs.VERSION }}.zip
asset_content_type: application/gzip
- name: Publish kcb TAR
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./benchmark/target/keycloak-benchmark-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_name: keycloak-benchmark-${{ steps.get_version.outputs.VERSION }}.tar.gz
asset_content_type: application/gzip
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

0 comments on commit a293138

Please sign in to comment.