-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (65 loc) · 2.51 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
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write # Required for creating releases and uploading assets
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: "1.37.0"
- name: Build Executables
run: |
rm -f deno.lock
deno cache main.ts
deno run --allow-read --allow-write --allow-run="git,vim,gh,deno" scripts/build.ts
- name: Generate Release Notes
uses: actions/github-script@v7
id: release_notes
with:
script: |
const { data: notes } = await github.rest.repos.generateReleaseNotes({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: context.ref.replace('refs/tags/', '')
});
return notes.body;
result-encoding: string
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
${{ steps.release_notes.outputs.result }}
## Quick Install
```bash
curl -fsSL https://raw.githubusercontent.com/${{ github.repository }}/main/scripts/install.sh | bash
```
## Manual Downloads
- [macOS ARM64 (M1/M2)](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/auto-commit-darwin-arm64)
- [macOS Intel](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/auto-commit-darwin-x64)
- [Windows](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/auto-commit-windows-x64.exe)
- [Linux](https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/auto-commit-linux-x64)
draft: false
prerelease: false
- name: Upload Release Assets
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
dist/auto-commit-darwin-arm64
dist/auto-commit-darwin-x64
dist/auto-commit-windows-x64.exe
dist/auto-commit-linux-x64
scripts/install.sh