Skip to content

Release Droid - Upload GitHub Release Assets #28

Release Droid - Upload GitHub Release Assets

Release Droid - Upload GitHub Release Assets #28

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@v3
with:
fetch-depth: 0
- name: "Install Lua"
uses: leafo/gh-actions-lua@v10
with:
luaVersion: 5.4
- name: "Install LuaRocks"
uses: leafo/gh-actions-luarocks@v4
with:
luarocksVersion: "3.9.2"
- name: "Install dependencies"
run: |
luarocks --local install *.rockspec --deps-only
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: "temurin"
java-version: 11
cache: "maven"
- name: Build with Maven skipping tests
run: mvn --batch-mode clean verify -DskipTests
- name: Generate sha256sum files
run: |
cd target
find . -maxdepth 1 \( -name '*.lua' -o -name '*.sql' \) -exec bash -c 'sha256sum {} > {}.sha256' \;
- name: Generate sha256sum files for extension
run: cd extension/dist/ && sha256sum row-level-security-extension.js > row-level-security-extension.js.sha256
- name: Upload extension
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: extension/dist/row-level-security-extension.js*
- name: Upload SQL scripts to the GitHub release draft
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: target/*.sql
- name: Upload SQL scripts to the GitHub release draft
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: target/*.lua
- name: Upload sha256sum files
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: target/*.sha256
- name: Upload error-code-report
uses: shogo82148/actions-upload-release-asset@v1
with:
upload_url: ${{ github.event.inputs.upload_url }}
asset_path: target/error_code_report.json