40 lines
1021 B
YAML
40 lines
1021 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'
|
|
- uses: snok/install-poetry@v1
|
|
with:
|
|
virtualenvs-create: true
|
|
- name: Install Dependencies
|
|
run: poetry install
|
|
# 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: Inject version
|
|
run: |
|
|
touch src/__version__.py
|
|
echo "__version__ = '${{ env.SHORT_SHA }}'" >> src/__version__.py
|
|
- name: build the sucker
|
|
run: make build
|
|
- uses: ncipollo/release-action@v1
|
|
with:
|
|
artifacts: "utils"
|
|
body: "It's releasin' time"
|
|
generateReleaseNotes: true
|
|
tag: ${{ env.SHORT_SHA }}
|
|
commit: master
|
|
token: ${{ secrets.PAT }}
|