🔖 Update version number to v1.0.14 (#22) #48
Workflow file for this run
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: Java CI | |
on: | |
push: | |
branches: main | |
tags: v* | |
pull_request: | |
branches: main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: temurin | |
- uses: gradle/actions/setup-gradle@v3 | |
- run: ./gradlew build | |
- run: ./gradlew javadoc | |
if: github.ref_type != 'tag' | |
- name: Sign | |
if: github.actor != 'nektos/act' && github.actor != 'dependabot[bot]' && (github.ref_type == 'tag' || github.ref_name == 'main') | |
run: | | |
eval `ssh-agent -s` | |
ssh-add - <<< '${{ secrets.DEPLOY_KEY_PRIVATE }}' | |
echo '${{ vars.DEPLOY_KEY_PUBLIC }}' > '${{ runner.temp }}/DEPLOY_KEY_PUBLIC.pub' | |
for filename in build/libs/switcheroo-*.jar; do | |
ssh-keygen -Y sign -f '${{ runner.temp }}/DEPLOY_KEY_PUBLIC.pub' -n file "$filename" | |
ssh-keygen -Y verify -f ./.github/authorized_keys -I '41898282+github-actions[bot]@users.noreply.github.com' -n file -s "$filename.sig" < "$filename" | |
done | |
- uses: actions/upload-artifact@v4 | |
if: github.ref_name == 'main' && github.actor != 'nektos/act' | |
with: | |
name: switcheroo | |
path: build/libs | |
if-no-files-found: error | |
- run: gh release create ${{ github.ref_name }} --generate-notes --title ${{ github.ref_name }} --verify-tag build/libs/* | |
if: github.ref_type == 'tag' && github.actor != 'nektos/act' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: ./gradlew publish | |
if: github.ref_type == 'tag' && github.actor != 'nektos/act' | |
env: | |
GITHUB_USERNAME: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |