generated from sensein/python-package-template
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.24 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Auto-release
on:
# ATM, this is the closest trigger to a PR merging
workflow_run:
workflows: [Python Tests]
branches: [main]
types: [completed]
env:
AUTO_VERSION: v11.1.2
jobs:
auto-release:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Prepare repository
# Fetch full git history and tags
run: git fetch --unshallow --tags
- name: Unset header
# checkout@v2 adds a header that makes branch protection report errors
# because the Github action bot is not a collaborator on the repo
run: git config --local --unset http.https://github.com/.extraheader
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Download auto
run: |
auto_download_url="$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/tags/$AUTO_VERSION | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')"
wget -O- "$auto_download_url" | gunzip > ~/auto
chmod a+x ~/auto
- name: Create release
run: |
~/auto shipit -vv
env:
GH_TOKEN: ${{ secrets.AUTO_ORG_TOKEN }}