Skip to content

Version 1.2.4

Version 1.2.4 #25

Workflow file for this run

name: Build and Release
on:
push:
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-package: "jdk+fx"
java-version: "21"
- name: Build with Maven
run: mvn clean package
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: release-jar
path: target/*.jar
- name: Publish release to R2
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: 'us-east-1'
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_BUCKET_NAME }}
CF_ACCOUNT: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
RELEASE: ${{ github.ref_name }}
run: |
aws s3 cp target/ s3://${AWS_S3_BUCKET_NAME}/FileToPNG/releases/tag/${RELEASE}/ \
--recursive \
--exclude "*" \
--include "FileToPNG*.jar" \
--quiet \
--endpoint-url https://${CF_ACCOUNT}.eu.r2.cloudflarestorage.com
release:
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: release-jar
path: target/
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
with:
name: FileToPNG ${{ github.ref_name }}
body: This is the release for version ${{ github.ref_name }}.
draft: false
files: "target/*release.jar"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Release Information
run: echo "Release ${{ steps.create_release.outputs.upload_url }}"