utils/.github/workflows/build_and_release.yml

38 lines
952 B
YAML
Raw Normal View History

2022-07-22 15:24:11 -04:00
name: Release
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
2022-07-22 15:28:13 -04:00
- uses: actions/setup-python@v4
with:
python-version: '3.10.x'
2022-07-22 15:24:11 -04:00
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
- name: Install Dependencies
run: poetry install
2022-07-22 22:20:07 -04:00
# https://stackoverflow.com/a/64195658
- name: Add SHORT_SHA env property with commit short sha
2022-07-23 00:43:38 -04:00
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-7`" >> $GITHUB_ENV
2022-07-23 12:05:34 -04:00
- name: Build the sucker
run: |
sed -i -e "s/?????/${{ env.SHORT_SHA }}/g" src/__init__.py
make build
2022-07-22 15:24:11 -04:00
- uses: ncipollo/release-action@v1
with:
artifacts: "utils"
body: "It's releasin' time"
2022-07-23 13:46:46 -04:00
generateReleaseNotes: false
2022-07-22 22:39:03 -04:00
tag: ${{ env.SHORT_SHA }}
2022-07-22 21:51:16 -04:00
commit: master
2022-07-22 21:26:42 -04:00
token: ${{ secrets.PAT }}