Pre-release #144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pre-release | |
on: | |
# push: | |
# branches: | |
# - main | |
# paths-ignore: | |
# - '.github/**' | |
# - 'test/**' | |
# - '**/README.md' | |
workflow_dispatch: | |
jobs: | |
pre-release: | |
name: Pre-release | |
runs-on: ubuntu-latest | |
container: | |
image: aemiii91/miyoomini-toolchain:latest | |
options: --user root | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Git config | |
run: | | |
git config --global --add safe.directory /__w/Onion/Onion | |
- name: Get version | |
run: | | |
echo "BUILD_VERSION=$(make version)" >> $GITHUB_ENV | |
echo "SHA_SHORT=$(git log -n 1 --pretty=format:"%h" origin/main)" >> $GITHUB_ENV | |
- name: Print version | |
run: | | |
echo "Onion-v${{ env.BUILD_VERSION }}-${{ env.SHA_SHORT }}" | |
- name: Build release | |
shell: bash | |
run: | | |
source /root/.bashrc | |
VERSION_OVERRIDE=${{ env.BUILD_VERSION }}-${{ env.SHA_SHORT }} make release | |
- uses: marvinpinto/action-automatic-releases@latest | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
automatic_release_tag: latest | |
prerelease: true | |
title: "Onion V${{ env.BUILD_VERSION }}" | |
files: | | |
release/Onion-v${{ env.BUILD_VERSION }}-${{ env.SHA_SHORT }}.zip |