Skip to content

gha challenge: echo tag #25

gha challenge: echo tag

gha challenge: echo tag #25

Workflow file for this run

name: Build document
on: [ push, create ]
jobs:
make-firmware:
name: Compile firmware
runs-on: ubuntu-latest
env:
REF: ${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup safe directory for git
run: |
repo=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}
git config --global --add safe.directory /__w/${repo}/${repo}
- name: Build firmware (at a push)
if: github.event_name == 'push'
run: |
make docker
make firmware
- name: Upload artifact files (at a push)
uses: actions/upload-artifact@v3
with:
path: |
micropython/build
- name: Release firmware (at a tag)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
echo "micropython/build/pipico-micropython-scpi-${REF##*/}.uf2"
- name: Release firmware (at a tag)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: softprops/action-gh-release@v2
with:
files: micropython/build/pipico-micropython-scpi-${REF##*/}.uf2
make-document:
name: Compile document
runs-on: ubuntu-latest
container:
image: k4zuki/pandocker-alpine:2.19
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Setup safe directory for git
run: |
repo=${GITHUB_REPOSITORY#${GITHUB_REPOSITORY_OWNER}/}
git config --global --add safe.directory /__w/${repo}/${repo}
- name: Update dependencies
run: |
pip3 install pandocker-lua-filters
pip3 install -U docx-coreprop-writer
pip3 install git+https://github.com/k4zuki/[email protected]
- name: Build document
run: |
make initdir apidoc html
- name: Release manuals (at a tag)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: softprops/action-gh-release@v2
with:
files: |
doc/Out/*.docx
doc/Out/*.html