Release #141
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: | |
branches: | |
- main | |
# schedule: | |
# - cron: "0 9 * * 2" # every Tuesday at 9 am UTC | |
jobs: | |
release: | |
name: release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK | |
uses: actions/setup-java@v4 | |
with: | |
java-version: "17" | |
distribution: "temurin" | |
cache: maven | |
- name: Decode Keystore | |
id: decode_keystore | |
env: | |
fileName: ./keystore.jks | |
encodedString: ${{ secrets.KEYSTORE }} | |
sha: ${{ secrets.KEYSTORE_SHA }} | |
run: | | |
echo "$encodedString" | base64 -d > $fileName | |
echo "$sha $fileName" > sha256.txt | |
sha256sum -c sha256.txt | |
- name: Build with Maven | |
run: ./mvnw clean verify -P sign | |
env: | |
KEYSTORE_PASS: ${{ secrets.KEYSTORE_PASS }} | |
- name: Set up Git actions user | |
uses: fregante/setup-git-user@v1 | |
- name: Create release tag | |
id: createTag | |
run: | | |
TAG_NAME="v$(git show -s --format=%cd --date=format:%Y%m%d.%H%M%S)" | |
git tag | |
git push --tags | |
echo "::set-output name=tagName::$TAG_NAME" | |
- name: Create release | |
if: ${{ !env.ACT }} | |
id: create_release | |
env: | |
GH_TOKEN: ${{ github.token }} | |
run: gh release create ${{ steps.createTag.outputs.tagName }} --generate-notes $(find . -name 'update-site-*.zip') | |
- name: Upload binaries to static.snyk.io | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_REGION: us-east-1 | |
run: | | |
.github/upload-to-s3.sh stable |