-
Notifications
You must be signed in to change notification settings - Fork 15
166 lines (146 loc) · 5.52 KB
/
artifacts.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
name: Release
on:
workflow_dispatch:
inputs:
tag_name:
description: "Tag name for release"
required: true
default: master
push:
branches:
- master
tags:
- v*
jobs:
artifacts:
name: artifacts
strategy:
matrix:
go-version: [1.22.4]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: build
run: |
make build-release
- name: "Upload macOS-amd64 artifact"
uses: actions/upload-artifact@v2
with:
name: helm_ls_darwin_amd64
path: ./dist/darwin-amd64_darwin_amd64_v1/helm-ls
retention-days: 1
- name: "Upload macOS-arm64 artifact"
uses: actions/upload-artifact@v2
with:
name: helm_ls_darwin_arm64
path: ./dist/darwin-arm64_darwin_arm64/helm-ls
retention-days: 1
- name: "Upload linux/amd64 artifact"
uses: actions/upload-artifact@v2
with:
name: helm_ls_linux_amd64
path: ./dist/linux-amd64_linux_amd64_v1/helm-ls
retention-days: 1
- name: "Upload linux/arm artifact"
uses: actions/upload-artifact@v2
with:
name: helm_ls_linux_arm
path: ./dist/linux-arm64_linux_arm64/helm-ls
retention-days: 1
- name: "Upload windows/amd64 artifact"
uses: actions/upload-artifact@v2
with:
name: helm_ls_windows_amd64
path: ./dist/windows-amd64_windows_amd64_v1/helm-ls.exe
retention-days: 1
publish:
needs: [artifacts]
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- uses: actions/download-artifact@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- if: github.event_name == 'workflow_dispatch'
run: echo "TAG_NAME=${{ github.event.inputs.tag_name }}" >> $GITHUB_ENV
- if: github.event_name == 'schedule'
run: echo 'TAG_NAME=master' >> $GITHUB_ENV
- if: github.event_name == 'push'
run: |
TAG_NAME=${{ github.ref }}
echo "TAG_NAME=${TAG_NAME#refs/*/}" >> $GITHUB_ENV
- name: Generate Linux-64 SHA256 checksums
run: |
sha256sum helm_ls_linux_amd64/helm-ls > helm_ls_linux_amd64.sha256sum
echo "SHA_LINUX_64=$(cat helm_ls_linux_amd64.sha256sum)" >> $GITHUB_ENV
- name: Generate Windows-64 SHA256 checksums
run: |
sha256sum helm_ls_windows_amd64/helm-ls.exe > helm_ls_windows_amd64.sha256sum
echo "SHA_WINDOWS_64=$(cat helm_ls_windows_amd64.sha256sum)" >> $GITHUB_ENV
- name: Generate macOS-amd64 SHA256 checksums
run: |
sha256sum helm_ls_darwin_amd64/helm-ls > helm_ls_darwin_amd64.sha256sum
echo "SHA_MACOS_AMD64=$(cat helm_ls_darwin_amd64.sha256sum)" >> $GITHUB_ENV
- name: Generate macOS-arm64 SHA256 checksums
run: |
sha256sum helm_ls_darwin_arm64/helm-ls > helm_ls_darwin_arm64.sha256sum
echo "SHA_MACOS_ARM64=$(cat helm_ls_darwin_arm64.sha256sum)" >> $GITHUB_ENV
- name: Generate Linux-ARM SHA256 checksums
run: |
sha256sum helm_ls_linux_arm/helm-ls > helm_ls_linux_arm.sha256sum
echo "SHA_LINUX_ARM=$(cat helm_ls_linux_arm.sha256sum)" >> $GITHUB_ENV
- if: env.TAG_NAME == 'master'
run: echo 'SUBJECT=HelmLs development (prerelease) build' >> $GITHUB_ENV
- if: env.TAG_NAME != 'master'
run: echo 'SUBJECT=${{ env.TAG_NAME }}' >> $GITHUB_ENV
- uses: meeDamian/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.TAG_NAME }}
name: ${{ env.SUBJECT }}
prerelease: ${{ env.TAG_NAME == 'master' }}
commitish: ${{ github.sha }}
gzip: false
allow_override: true
files: |
helm_ls_darwin_amd64:./helm_ls_darwin_amd64/helm-ls
helm_ls_darwin_amd64.sha256sum:./helm_ls_darwin_amd64.sha256sum
helm_ls_darwin_arm64:./helm_ls_darwin_arm64/helm-ls
helm_ls_darwin_arm64.sha256sum:./helm_ls_darwin_arm64.sha256sum
helm_ls_windows_amd64.exe:./helm_ls_windows_amd64/helm-ls.exe
helm_ls_windows_amd64.sha256sum:./helm_ls_windows_amd64.sha256sum
helm_ls_linux_amd64:./helm_ls_linux_amd64/helm-ls
helm_ls_linux_amd64.sha256sum:./helm_ls_linux_amd64.sha256sum
helm_ls_linux_arm:./helm_ls_linux_arm/helm-ls
helm_ls_linux_arm.sha256sum:./helm_ls_linux_arm.sha256sum
body: |
### macOS (x64)
1. Download **helm_ls_darwin_amd64**
2. Run `./helm_ls_darwin_amd64`
### macOS (ARM)
1. Download **helm_ls_darwin_arm64**
2. Run `./helm_ls_darwin_arm64`
### windows (x64)
1. Download **helm_ls_windows_amd64.exe**
2. Run `./helm_ls_windows_amd64.exe`
### Linux (x64)
1. Download **helm_ls_linux_amd64**
2. Run `./helm_ls_linux_amd64`
### Linux (ARM)
1. Download **helm_ls_linux_arm**
2. Run `./helm_ls_linux_arm`
## SHA256 Checksums
```
${{ env.SHA_LINUX_64 }}
${{ env.SHA_MACOS_AMD64 }}
${{ env.SHA_MACOS_ARM64 }}
${{ env.SHA_WINDOWS_64 }}
${{ env.SHA_LINUX_ARM }}
```