Skip to content

Release Droid - Upload GitHub Release Assets #29

Release Droid - Upload GitHub Release Assets

Release Droid - Upload GitHub Release Assets #29

name: Release Droid - Upload GitHub Release Assets
on:
workflow_dispatch:
inputs:
upload_url:
description: "Assets upload URL"
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDKs
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: |
11
17
cache: "maven"
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
id: go
- name: Prepare testing extension
run: |
cd ./extension-manager-integration-test-java/testing-extension
npm ci
npm run build
cd dist
sha256sum testing-extension.js > testing-extension.js.sha256
- name: Build with Maven skipping tests
run: mvn --batch-mode clean verify -DskipTests
- name: Build extension-manager-${{ runner.os }} binary
run: go build -o extension-manager-${{ runner.os }} cmd/main.go
- name: Generate sha256sum files for extension-manager-${{ runner.os }}
run: find . -maxdepth 1 -name extension-manager-${{ runner.os }} -exec bash -c 'sha256sum {} > {}.sha256' \;
- name: Upload Extension Manager binary to the GitHub release
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: ./extension-manager-${{ runner.os }}
- name: Upload Extension Manager sha256sum file
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: ./extension-manager-${{ runner.os }}.sha256
- name: Upload testing extension
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: extension-manager-integration-test-java/testing-extension/dist/testing-extension.js*
- name: Upload error-code-report
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: extension-manager-integration-test-java/target/error_code_report.json