forked from nager/Nager.Country
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.11 KB
/
create-release.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
name: Create Release
on:
push:
paths:
- 'src/**'
branches: [ master ]
jobs:
build:
name: Create release
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100
- name: Install project dependencies
working-directory: ./src
run: dotnet restore
- name: Build
working-directory: ./src
run: dotnet build --configuration Release --no-restore
- name: Export Countries
working-directory: ./src/Nager.Country.Export/bin/Release/net5.0
run: |
./Nager.Country.Export.exe
Compress-Archive -Path export/*.json -DestinationPath countries.zip
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: nager/Nager.Country
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: src/Nager.Country.Export/bin/Release/net5.0/countries.zip
asset_name: countries.zip
tag: ${{ github.ref }}-${{ github.run_id }}
overwrite: true
body: "Countries as json"