Skip to content

Weekly Release Robot #39

Weekly Release Robot

Weekly Release Robot #39

name: Weekly Release Robot
on:
schedule:
# Run every Sunday at 23:55 UTC (5 min to still get "today" date)
- cron: '55 23 * * 0'
workflow_dispatch: # Allow manual triggering
permissions:
contents: write
jobs:
weekly-release:
runs-on: ubuntu-24.04
name: Weekly Release
steps:
- name: Checkout with submodules
uses: actions/checkout@v5
with:
ref: next
submodules: true
fetch-depth: 0 # To make git describe give the intended output
- name: Setup java
uses: actions/setup-java@v5
with:
java-version: 17
distribution: zulu
cache: maven
- name: Set version with current date
run: |
VERSION=$(date +'%y.%m.%d')
echo "VERSION=$VERSION" >> $GITHUB_ENV
./mvnw versions:set -DnewVersion=$VERSION -DgenerateBackupPoms=false
- name: Run Maven
run: ./mvnw initialize && ./mvnw -T1C -B -U verify
- name: Get SHA-256 of JAR
run: echo "JARSUM=$(shasum -a 256 --tag ./tool/target/jcard.jar)" >> "$GITHUB_ENV"
- name: Deploy package
uses: martinpaljak/maven-ssh-deploy@v1
with:
key: ${{ secrets.SSH_KEY }}
user: mvn@mvn.javacard.pro
host_fp: SHA256:auiF3nHWvDmvq2stDl+QEECCqMcDp+FY1/bDRnvxpRw
- name: Release
uses: softprops/action-gh-release@v2.5.0
with:
prerelease: true
tag_name: v${{ env.VERSION }}
name: Weekly v${{ env.VERSION }}
files: ./tool/target/jcard.jar
fail_on_unmatched_files: true
body: |
## Weekly release v${{ env.VERSION }}
`${{ env.JARSUM }}` (built with JDK-17)