Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Build

Build #36

Workflow file for this run

---
name: Build
on:
push:
pull_request:
schedule:
- cron: '0 0 * * 0'
jobs:
build:
runs-on: ubuntu-latest
env:
artifact_dir: dist/*
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- name: Build
run: |
docker build -t builder .
- name: Run
run: |
docker run --rm -v $PWD/dist:/dist -e BRANCH_NAME=${GITHUB_REF##*/} builder
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: artifacts
path: ${{ env.artifact_dir }}
if-no-files-found: error
release:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags')
steps:
- name: Download artifacts from build
uses: actions/download-artifact@v2
- name: List artifacts
run: ls -R
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: artifacts/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true