Skip to content

add release action

add release action #2

Workflow file for this run

name: release-otoroshi
on:
workflow_dispatch:
inputs:
version_from:
description: "Version number (ie: 16.11.0-dev)"
version_to:
description: "Version number (ie: 16.11.0)"
version_next:
description: "Version number (ie: 16.12.0-dev)"
version_last:
description: "Version number (ie: 16.10.3)"
description:
description: "release description"
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:

Check failure on line 20 in .github/workflows/release.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/release.yaml

Invalid workflow file

You have an error in your yaml syntax on line 20
- uses: actions/checkout@v3
- name: setup jdk11
uses: actions/setup-java@v1
with:
java-version: 11
- name: setup node
uses: actions/setup-node@v3
with:
node-version: '16.x'
- uses: coursier/cache-action@v5
- name: setup release dir
run: |
mkdir -p ./release-${{ inputs.version_to }}
- name: setup git
run: |
git config --global user.email "[email protected]"
git config --global user.name "otoroshi-bot-github-actions"
git config --global --list
- name: setup pgp
env:
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
run: |
mkdir -p ~/.sbt/gpg
echo "$PGP_SECRET" | base64 --decode > ~/.sbt/gpg/secring.key
gpg --batch --pinentry-mode=loopback --yes --passphrase "$PGP_PASSPHRASE" --import ~/.sbt/gpg/secring.key
gpg --batch --pinentry-mode=loopback --yes --passphrase "$PGP_PASSPHRASE" --export-secret-key 4EFDC6FC2DEC936B13B7478C2F8C0F4E1D397E7F > ~/.sbt/gpg/secring.gpg
- name: login to dockerhub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Setup xvfb for screen 0
run: Xvfb :1 -screen 0 1600x1200x24 &
- name: run-release-process
id: build-libs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
DISPLAY: :1
run: |
cd ./scripts/release
npm install
node github-action-release.js --from=${{ inputs.version_from }} --to=${{ inputs.version_to }} --next=${{ inputs.version_next }} --last=${{ inputs.version_last }} --dry=true --location=$(pwd)
- name: Generate SHA-256
run: |
shasum -a 256 ./release-${{ inputs.version_to }}/otoroshi.zip | cut -d ' ' -f 1 > ./release-${{ inputs.version_to }}/otoroshi.zip.sha256
shasum -a 256 ./release-${{ inputs.version_to }}/otoroshi-${{ inputs.version_to }}.zip | cut -d ' ' -f 1 > ./release-${{ inputs.version_to }}/otoroshi-${{ inputs.version_to }}.zip.sha256
shasum -a 256 ./release-${{ inputs.version_to }}/otoroshi-manual-${{ inputs.version_to }}.zip | cut -d ' ' -f 1 > ./release-${{ inputs.version_to }}/otoroshi-manual-${{ inputs.version_to }}.zip.sha256
- name: Release binary to GitHub
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ inputs.version_to }}
body: ${{ inputs.description }}
files: |
./release-${{ inputs.version_to }}/otoroshi.zip
./release-${{ inputs.version_to }}/otoroshi-${{ inputs.version_to }}.zip
./release-${{ inputs.version_to }}/otoroshi-manual-${{ inputs.version_to }}.zip
./release-${{ inputs.version_to }}/otoroshi.zip.sha256
./release-${{ inputs.version_to }}/otoroshi-${{ inputs.version_to }}.zip.sha256
./release-${{ inputs.version_to }}/otoroshi-manual-${{ inputs.version_to }}.zip.sha256