-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (52 loc) · 1.4 KB
/
test.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
on:
push:
tags:
- 'v*.*.*'
pull_request:
workflow_dispatch:
name: Test
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: write
pull-requests: write
jobs:
test:
runs-on: ${{ vars.RUNNER_TEST }}
env:
GOPRIVATE: github.com/anyproto
steps:
- name: git config
run: git config --global url.https://${{ secrets.ANYTYPE_PAT }}@github.com/.insteadOf https://github.com/
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: build rust
run: |
cd rust
cargo test
make install-all
- name: build go
run: |
echo GOPATH=$(go env GOPATH) >> $GITHUB_ENV
echo GOBIN=$(go env GOPATH)/bin >> $GITHUB_ENV
echo $(go env GOPATH)/bin >> $GITHUB_PATH
make build-verify
make test
- name: Create archives
run: |
mkdir -p .release
for dir in libs/*/ ; do
dir_name=$(basename "$dir")
tar -czf ".release/${dir_name}.tar.gz" -C "$dir" .
done
if: github.event_name == 'push'
- name: Release
if: github.event_name == 'push'
uses: softprops/action-gh-release@v2
with:
files: '.release/*'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}