-
Notifications
You must be signed in to change notification settings - Fork 48
64 lines (64 loc) · 2.38 KB
/
autobuild.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
on:
workflow_dispatch:
name: Auto-Build
jobs:
build:
name: Build
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@v2
- run: docker build -t builder .
- run: git clone --depth=1 --branch mosh-1.3.2 https://github.com/mobile-shell/mosh.git
- run: docker run -v $PWD/mosh:/mosh -w /mosh --name=builder builder sh -c './autogen.sh && LDFLAGS=-static ./configure && make'
- uses: actions/upload-artifact@v2
with:
name: mosh-server
path: mosh/src/frontend/mosh-server
if-no-files-found: error
- uses: actions/upload-artifact@v2
with:
name: mosh-client
path: mosh/src/frontend/mosh-client
if-no-files-found: error
- run: |
(
echo '- [Build #${{ github.run_number }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})'
echo '- [Workflow file](https://github.com/${{ github.repository }}/blob/${{ github.sha }}/.github/workflows/autobuild.yml)'
echo
echo '## Files'
echo '```'
(cd mosh/src/frontend && file mosh-server mosh-client)
echo '```'
echo
echo '## SHA256 Checksums'
echo '```'
(cd mosh/src/frontend && sha256sum mosh-server mosh-client)
echo '```'
) | tee release.md
- id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: run-${{ github.run_number }}
release_name: "Build #${{ github.run_number }}"
body_path: release.md
prerelease: false
draft: false
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: mosh/src/frontend/mosh-client
asset_name: mosh-client
asset_content_type: application/octet-stream
- uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: mosh/src/frontend/mosh-server
asset_name: mosh-server
asset_content_type: application/octet-stream