Skip to content

feat: Config file support (#58) #140

feat: Config file support (#58)

feat: Config file support (#58) #140

Workflow file for this run

name: main
on:
workflow_dispatch:
push:
branches:
- "**"
tags-ignore:
- "**"
permissions:
contents: write
pull-requests: write
issues: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
platform:
- ubuntu-22.04
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- run: ./script/build
shell: bash
- uses: actions/upload-artifact@v4
with:
name: nvrh-${{ matrix.platform }}-${{ runner.arch }}
retention-days: 7
path: |
dist/*
release_please:
needs:
- build
runs-on: ubuntu-latest
outputs:
release_please_version: ${{ steps.release_please.outputs.version }}
release_please_tag_name: ${{ steps.release_please.outputs.tag_name }}
release_please_release_created: ${{ steps.release_please.outputs.release_created }}
steps:
- uses: actions/checkout@v4
- uses: googleapis/release-please-action@v4
id: release_please
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: node
deploy:
needs:
- release_please
- build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
if: ${{ needs.release_please.outputs.release_please_release_created == 'true' }}
# prepare-env: Push as github bot.
# https://github.community/t/github-actions-bot-email-address/17204/5
- name: Prep for git push
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
shell: bash
if: ${{ needs.release_please.outputs.release_please_release_created == 'true' }}
- uses: actions/download-artifact@v4
if: ${{ needs.release_please.outputs.release_please_release_created == 'true' }}
# This is CI specific, artifacts don't seem to be stored with a helpful
# path.
- run: |
mkdir -p dist
cp -rl nvrh-ubuntu-22.04-X64/* dist
shell: bash
if: ${{ needs.release_please.outputs.release_please_release_created == 'true' }}
- run: ./script/deploy "${{ needs.release_please.outputs.release_please_version }}" "${{ needs.release_please.outputs.release_please_tag_name }}"
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ needs.release_please.outputs.release_please_release_created == 'true' }}