mirror of
https://github.com/fmtr/haco.git
synced 2026-10-26 19:01:51 -04:00
Reinstate Actions
This commit is contained in:
parent
c75d5aa446
commit
cc62959c37
1 changed files with 0 additions and 0 deletions
66
.github/workflows/main.yml
vendored
Normal file
66
.github/workflows/main.yml
vendored
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
name: Version and Deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'haco/versionTEMP'
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
VERSION: ${{ github.event.inputs.version }}
|
||||
NAME: ${{ github.event.repository.name }}
|
||||
NAME_SHORT: ${{ github.event.repository.name }}
|
||||
ORG: ${{ github.repository_owner }}
|
||||
#SHLINK_API_KEY: ${{ secrets.SHLINK_API_KEY }}
|
||||
#LINK_ID: haco/tapp
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set Version Environment Variable
|
||||
run: |
|
||||
VERSION=$(cat ${PATH_VERSION})
|
||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||
|
||||
- name: Install Tools
|
||||
run: |
|
||||
pip install twine
|
||||
pip install -U packaging setuptools twine pip build #https://github.com/pypa/twine/issues/1216
|
||||
|
||||
|
||||
- name: Increment Version
|
||||
env:
|
||||
GIT_EMAIL: ${{ secrets.GIT_EMAIL }}
|
||||
run: |
|
||||
git config --global user.name 'Frontmatter Actions'
|
||||
git config --global user.email "$GIT_EMAIL"
|
||||
VERSION=${{ env.VERSION }}
|
||||
git tag -a v${VERSION} -m "Release version ${VERSION}"
|
||||
git checkout --track origin/release
|
||||
git rebase main
|
||||
git push --follow-tags
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
tag_name: v${{ env.VERSION }}
|
||||
generate_release_notes: true
|
||||
prerelease: true
|
||||
|
||||
- name: Build Wheel
|
||||
run: |
|
||||
python -m build
|
||||
|
||||
- name: Push Wheel
|
||||
env:
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||
TWINE_USERNAME: __token__
|
||||
run: |
|
||||
twine upload dist/*
|
||||
Loading…
Add table
Add a link
Reference in a new issue