-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (46 loc) · 1.37 KB
/
Copy pathrelease.yml
File metadata and controls
54 lines (46 loc) · 1.37 KB
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
name: release
on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version:
description: "Version without leading v (e.g. 1.18.30)"
required: true
type: string
concurrency: release-${{ github.ref }}
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 0
- name: Setup Bun
uses: ./.github/actions/setup-bun
- name: Resolve version
id: version
run: |
version="${{ inputs.version || github.ref_name }}"
echo "value=${version#v}" >> "$GITHUB_OUTPUT"
- name: Build all platforms
run: bun run build:all
env:
OPENCODE_VERSION: ${{ steps.version.outputs.value }}
OPENCODE_CHANNEL: latest
BINARY_NAME: fuckcode
- name: Publish release
run: |
gh release create "v${{ steps.version.outputs.value }}" \
./packages/opencode/dist/*.zip \
./packages/opencode/dist/*.tar.gz \
./packages/opencode/dist/sha256.txt \
--title "v${{ steps.version.outputs.value }}" \
--generate-notes \
--repo "${{ github.repository }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}