-
Notifications
You must be signed in to change notification settings - Fork 38
79 lines (76 loc) · 2.64 KB
/
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: Release
on:
push:
tags:
- 'v**'
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0' # https://github.com/actions/checkout/issues/217
token: ${{ secrets.CI_TOKEN }}
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- uses: goreleaser/goreleaser-action@v6
with:
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.CI_TOKEN }}
release-github-action:
runs-on: ubuntu-latest
needs:
- create-release
steps:
- uses: actions/checkout@v3
with:
repository: gabotechs/dep-tree-action
token: ${{ secrets.CI_TOKEN }}
- run: |
VERSION="${GITHUB_REF_NAME:1}"
jq ".version=\"$VERSION\"" package.json > _package.json
mv _package.json package.json
git config --global user.email $(git --no-pager show -s --format='%ae' HEAD)
git config --global user.name $(git --no-pager show -s --format='%an' HEAD)
git commit -a -m "bump: version $VERSION"
git push origin main
git tag "v$VERSION"
git push --tags
release-node-wrapper:
runs-on: ubuntu-latest
needs:
- create-release
steps:
- uses: actions/checkout@v3
with:
repository: gabotechs/node-dep-tree
token: ${{ secrets.CI_TOKEN }}
- run: |
VERSION="${GITHUB_REF_NAME:1}"
jq ".version=\"$VERSION\"" package.json > _package.json
mv _package.json package.json
git config --global user.email $(git --no-pager show -s --format='%ae' HEAD)
git config --global user.name $(git --no-pager show -s --format='%an' HEAD)
git commit -a -m "bump: version $VERSION"
git push origin main
release-python-wrapper:
runs-on: ubuntu-latest
needs:
- create-release
steps:
- uses: actions/checkout@v3
with:
repository: gabotechs/python-dep-tree
token: ${{ secrets.CI_TOKEN }}
- run: |
VERSION="${GITHUB_REF_NAME:1}"
sed "s/version = \".*\"/version = \"$VERSION\"/" pyproject.toml > _pyproject.toml
mv _pyproject.toml pyproject.toml
sed "s/__version__ = '.*'/__version__ = '$VERSION'/" dep_tree/main.py > dep_tree/_main.py
mv dep_tree/_main.py dep_tree/main.py
git config --global user.email $(git --no-pager show -s --format='%ae' HEAD)
git config --global user.name $(git --no-pager show -s --format='%an' HEAD)
git commit -a -m "bump: version $VERSION"
git push origin main