Repair GitHub Release Workflow

This commit is contained in:
Alex Zenla 2023-01-28 21:09:40 -08:00
parent 20a6359d5d
commit 404d01c649
Signed by: alex
GPG Key ID: C0780728420EBFE5
4 changed files with 29 additions and 22 deletions

View File

@ -1,30 +1,28 @@
name: Upload to S3
name: Release
on:
push:
branches:
- 'main'
- main
jobs:
upload:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Install JDK
uses: actions/setup-java@v2
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Build
run: ./gradlew --no-daemon build
- name: Organize artifacts
run: ./tools/organize-artifacts.sh
- uses: GayPizzaSpecifications/upload-s3-action@b2_support
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
aws_key_id: ${{ secrets.ARTIFACTS_KEY_ID }}
aws_secret_access_key: ${{ secrets.ARTIFACTS_APP_KEY }}
aws_bucket: ${{ secrets.ARTIFACTS_BUCKET }}
aws_endpoint: ${{ secrets.ARTIFACTS_ENDPOINT }}
aws_region: ${{ secrets.ARTIFACTS_REGION }}
source_dir: 'artifacts/'
destination_dir: 'foundation/'
arguments: build
- name: Organize Artifacts
run: ./tools/organize-artifacts.sh
- name: Upload to Backblaze
run: ./tools/gh-upload-backblaze.sh
env:
ARTIFACTS_KEY_ID: "${{ secrets.ARTIFACTS_KEY_ID }}"
ARTIFACTS_APP_KEY: "${{ secrets.ARTIFACTS_APP_KEY }}"
ARTIFACTS_BUCKET: "${{ secrets.ARTIFACTS_BUCKET }}"

View File

@ -1,9 +1,9 @@
plugins {
id("gay.pizza.foundation.concrete-plugin") version "0.7.0"
id("gay.pizza.foundation.concrete-plugin")
}
dependencies {
implementation("net.dv8tion:JDA:5.0.0-alpha.2") {
implementation("net.dv8tion:JDA:5.0.0-beta.3") {
exclude(module = "opus-java")
}

View File

@ -1,5 +1,5 @@
plugins {
id("gay.pizza.foundation.concrete-plugin") version "0.7.0"
id("gay.pizza.foundation.concrete-plugin")
}
dependencies {

9
tools/gh-upload-backblaze.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
set -e
BACKBLAZE_B2_VERSION="3.6.0"
curl -sL -o b2 "https://github.com/Backblaze/B2_Command_Line_Tool/releases/download/v${BACKBLAZE_B2_VERSION}/b2-linux"
chmod +x b2
./b2 authorize-account "${ARTIFACTS_KEY_ID}" "${ARTIFACTS_APP_KEY}"
./b2 sync --delete --replaceNewer artifacts/ "b2:///${ARTIFACTS_BUCKET}/foundation/"