-
Notifications
You must be signed in to change notification settings - Fork 0
106 lines (93 loc) · 3.5 KB
/
dotnetcore.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
name: Build, Test, Publish and Dockerise Lora-Map
on: [push]
jobs:
build:
name: Build, pack and release
runs-on: ubuntu-latest
steps:
- name: Checkout parent project with dependencys
uses: actions/checkout@v1
with:
repository: MONICA-Project/map-project
ref: refs/heads/master
submodules: true
- name: Checkout last versions
run: git -C Lora-Map checkout --progress --force ${{ github.sha }}
working-directory: ../map-project
- name: Install dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'
- name: Build with dotnet
run: dotnet build Lora-Map.sln --configuration Release
working-directory: ../map-project/Lora-Map
- name: Create deb files
if: success()
run: |
mkdir ../../../Builds
chmod oug+x make-deb.sh
./make-deb.sh amd64
./make-deb.sh armhf
id: create_deb
working-directory: ../map-project/Lora-Map/Lora-Map/dpkg
- name: Create release
if: success()
id: nightly_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.create_deb.outputs.builddaterelease }}
release_name: Nightly from ${{ steps.create_deb.outputs.builddaterelease }}
body: This is a nightly release. It may be not working properly.
draft: false
prerelease: true
- name: Upload release asset amd64
if: success()
id: upload-release-asset-amd64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.nightly_release.outputs.upload_url }}
asset_path: ../map-project/Builds/amd64-${{ steps.create_deb.outputs.debuilderfile }}
asset_name: amd64-${{ steps.create_deb.outputs.debuilderfile }}
asset_content_type: application/x-deb
- name: Upload release asset armhf
if: success()
id: upload-release-asset-armhf
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.nightly_release.outputs.upload_url }}
asset_path: ../map-project/Builds/armhf-${{ steps.create_deb.outputs.debuilderfile }}
asset_name: armhf-${{ steps.create_deb.outputs.debuilderfile }}
asset_content_type: application/x-deb
docker:
name: Build and push dockerfile
runs-on: ubuntu-latest
steps:
- name: Checkout parent project with dependencys
uses: actions/checkout@v1
with:
repository: MONICA-Project/map-project
ref: refs/heads/master
submodules: true
- name: Checkout last versions
run: git -C Lora-Map checkout --progress --force ${{ github.sha }}
working-directory: ../map-project
- name: Docker build
id: docker_build
run: |
DOCKERTAG=$(date +%Y%m%d%H%M%S)
echo "##[set-output name=dockertag;]$DOCKERTAG"
docker build . -t monicaproject/lora-map:latest -t monicaproject/lora-map:$DOCKERTAG
working-directory: ../map-project
- name: Docker-compose publish
if: success()
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin ${INPUT_REGISTRY}
docker push monicaproject/lora-map:latest
docker push monicaproject/lora-map:${{ steps.docker_build.outputs.dockertag }}
working-directory: ../map-project