-
Notifications
You must be signed in to change notification settings - Fork 5
77 lines (73 loc) · 2.33 KB
/
ci.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
name: CI
on: [push]
env:
OPENTAP_ANSI_COLORS: true
OPENTAP_NO_UPDATE_CHECK: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_CONSOLE_ANSI_COLOR: true
jobs:
Build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: true
- name: Fix tags
if: startsWith(github.ref, 'refs/tags/v')
run: git fetch -f origin ${{ github.ref }}:${{ github.ref }} # Fixes an issue with actions/checkout@v2. See https://github.com/actions/checkout/issues/290
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Build
run: dotnet publish -f netstandard2.0 -c Release
- name: Copy TapPackage
run: cp OpenTAP.TUI/bin/Release/TUI*.TapPackage .
- name: Upload build
uses: actions/upload-artifact@v3
with:
name: build
retention-days: 5
path: "TUI*.TapPackage"
Build-Pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Pages Cache
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install
run: npm install
working-directory: doc
- name: Build
run: npm run build
working-directory: doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v')
with:
publish_dir: public
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: pages
Publish:
runs-on: ubuntu-latest
needs: Build
if: github.ref == 'refs/heads/main' || contains(github.ref, 'refs/heads/release') || contains(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
with:
name: build
- uses: opentap/[email protected]
with:
version: 9.17.0
- name: Install PackagePublish
run: tap package install PackagePublish --version rc
- name: Publish
run: tap package publish "TUI*.TapPackage" -k ${{ secrets.REPO_PASS }}