-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (55 loc) · 1.63 KB
/
common-release.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Release
on:
push:
branches:
- master
permissions:
contents: write
packages: write
jobs:
release:
runs-on: ubuntu-latest
container: ghcr.io/release-engineers/build-image-poetry:latest
steps:
- uses: actions/checkout@v3
with:
ref: master
fetch-depth: 0
- uses: release-engineers/build-system@v0
- shell: bash
run: |
git config --global --add safe.directory '*'
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
build-system increment
build-system build
build-system test
- shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
build-system release
templating:
runs-on: ubuntu-latest
needs: [release]
steps:
- uses: actions/checkout@v3
with:
ref: master
- uses: release-engineers/action-template@v2
with:
source: 'README.md.template'
target: 'README.md'
- shell: bash
run: |
git config --global --add safe.directory '*'
git config --local user.name 'github-actions[bot]'
git config --local user.email 'github-actions[bot]@users.noreply.github.com'
git add README.md
if git commit --no-verify -m "docs: Regenerate README.md"; then
# rebase and push in a retry loop
for i in {1..5}; do
git pull --rebase && git push && break || sleep 1
done
fi