forked from ufo5260987423/scheme-langserver
-
Notifications
You must be signed in to change notification settings - Fork 2
51 lines (43 loc) · 1.82 KB
/
manually-release.yaml
File metadata and controls
51 lines (43 loc) · 1.82 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
name: manually-release
on: workflow_dispatch
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build Linux glibc image
run: docker build .
- name: Compile executable on Linux glibc
run: |
mkdir -p build
docker run \
-v ./build:/root/scheme-langserver/build/ \
$(docker build -q .) \
bash -c 'source .akku/bin/activate
compile-chez-program run.ss --static
mv run build/scheme-langserver-x86_64-linux-glibc || exit 1
'
- name: generate tag
id: tag
run: echo "tag_name=auto-build-$(date -u +%Y-%m-%d-%H-%M-%S)" >> "$GITHUB_OUTPUT"
- name: generate body
id: body
run: |
md5=$(md5sum build/scheme-langserver-x86_64-linux-glibc | awk '{print $1}')
sha256=$(sha256sum build/scheme-langserver-x86_64-linux-glibc | awk '{print $1}')
echo -e "### build time\n" > ${{ github.workspace }}-body.txt
echo -e "$(date -u +%Y-%m-%d-%H-%M-%S)\n" >> ${{ github.workspace }}-body.txt
echo -e "### File Hashes\n" >> ${{ github.workspace }}-body.txt
echo -e "| Algorithm | Hash |" >> ${{ github.workspace }}-body.txt
echo -e "| --------- | ---- |" >> ${{ github.workspace }}-body.txt
echo -e "| MD5 | \`$md5\` |" >> ${{ github.workspace }}-body.txt
echo -e "| SHA256 | \`$sha256\` |" >> ${{ github.workspace }}-body.txt
- name: Release
uses: softprops/action-gh-release@v2
with:
files: build/scheme-langserver-x86_64-linux-glibc
tag_name: ${{ steps.tag.outputs.tag_name }}
body_path: ${{ github.workspace }}-body.txt