-
Notifications
You must be signed in to change notification settings - Fork 282
48 lines (44 loc) · 1.17 KB
/
main.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
name: main
concurrency:
group: main
cancel-in-progress: true
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
packages: write
jobs:
release-main:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: false
go-version: "1.22"
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: v1.23.0
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_PROJECT_TOKEN: ${{ secrets.GH_PROJECT_TOKEN }}
- name: Upload to S3
uses: jakejarvis/[email protected]
env:
SOURCE_DIR: releases
DEST_DIR: releases
AWS_REGION: ${{ secrets.R2_REGION }}
AWS_S3_BUCKET: ${{ secrets.R2_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_KEY }}
AWS_S3_ENDPOINT: ${{ secrets.R2_ENDPOINT_URL }}