-
Notifications
You must be signed in to change notification settings - Fork 282
78 lines (75 loc) · 2.41 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
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
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
release-tag:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
cache: false
go-version: "1.23"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: "~> v2"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAP_GITHUB_TOKEN: ${{ secrets.TAP_GITHUB_TOKEN }}
GORELEASER_CURRENT_TAG: ${{ github.ref_name }}
winget-release:
needs: release-tag
if: "! contains(github.ref_name, '-rc')"
runs-on: windows-latest
steps:
- name: Install winget-create
run: |
Invoke-WebRequest -Uri 'https://aka.ms/wingetcreate/latest' -OutFile 'wingetcreate.exe'
- name: Create WinGet Package Update Pull Request
run: |
$url = "${{ github.server_url }}/${{ github.repository }}/releases/download/${{ github.ref_name }}/gptscript-${{ github.ref_name }}-windows-amd64.zip"
./wingetcreate.exe update --submit --token "${{ secrets.WINGET_GH_TOKEN }}" --urls $url --version "${{ github.ref_name }}" gptscript-ai.gptscript
node-release:
needs: release-tag
runs-on: ubuntu-latest
steps:
- name: trigger dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DISPATCH_PAT }}
repository: gptscript-ai/node-gptscript
event-type: release
client-payload: '{"tag": "${{ github.ref_name }}"}'
python-release:
needs: release-tag
runs-on: ubuntu-latest
steps:
- name: trigger dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DISPATCH_PAT }}
repository: gptscript-ai/py-gptscript
event-type: release
client-payload: '{"tag": "${{ github.ref_name }}"}'
go-release:
needs: release-tag
runs-on: ubuntu-latest
steps:
- name: trigger dispatch
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.DISPATCH_PAT }}
repository: gptscript-ai/go-gptscript
event-type: release
client-payload: '{"tag": "${{ github.ref_name }}"}'