38 lines
980 B
YAML
38 lines
980 B
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10.x'
|
|
- name: Install Env
|
|
# this should be all we need because shiv will download the deps itself
|
|
run: |
|
|
pip install shiv
|
|
pip install poetry
|
|
# https://stackoverflow.com/a/64195658
|
|
- name: Add SHORT_SHA env property with commit short sha
|
|
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
|
|
- name: Build the sucker
|
|
run: |
|
|
sed -i -e "s/?????/${{ env.SHORT_SHA }}/g" src/__init__.py
|
|
make build
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: "utils"
|
|
body: "It's releasin' time"
|
|
generateReleaseNotes: false
|
|
tag: ${{ env.SHORT_SHA }}
|
|
commit: master
|
|
token: ${{ secrets.PAT }}
|