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

bau-tag-to-release #27

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/tag-to-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Tag-zip release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

paths-ignore:
- '**/README.md'

env:
# This uses the default config, since
# build is not a actual config file in envs.
FLASK_ENV : build


jobs:
release_tag:
runs-on: ubuntu-latest
steps:

- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.10.x

- name: create python env
run: python -m venv .venv

- name: install dependencies
run: source .venv/bin/activate && python -m pip install --upgrade pip && pip install -r requirements.txt

- name: build static assets
run: source .venv/bin/activate && python build.py

- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: 'zip'
filename: '${{ github.event.repository.name }}-${{github.ref_name}}.zip'
exclusions: '*.git* *.venv/* *tests/*'

- name: Upload Release
uses: ncipollo/release-action@v1
with:
artifacts: '${{ github.event.repository.name }}-${{github.ref_name}}.zip'
token: ${{ secrets.GITHUB_TOKEN }}