-
-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (60 loc) · 2.54 KB
/
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
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
# This workflow will build a .NET project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
name: release
on:
workflow_dispatch:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Publish
run:
echo publishing as ${{ github.ref_name }}
dotnet publish /home/runner/work/toot2toulouse/toot2toulouse/Toot2ToulouseService/Toot2ToulouseService.csproj -p:Version=${{ github.ref_name }} -p:AssemblyVersion=${{ github.ref_name }} -c Release -o "/home/runner/work/out/bin/t2tservice"
dotnet publish /home/runner/work/toot2toulouse/toot2toulouse/Toot2Toulouse/Toot2ToulouseWeb.csproj -p:Version=${{ github.ref_name }} -p:AssemblyVersion=${{ github.ref_name }} -c Release -o "/home/runner/work/out/bin/t2tweb"
- name: Zip
run:
7z a -tzip "/home/runner/work/out/zip/t2t-${{ github.ref_name }}.zip" "/home/runner/work/out/bin/*"
- name: Tar
run:
tar czvf "/home/runner/work/out/zip/t2t-${{ github.ref_name }}.tar.gz" "/home/runner/work/out/bin/"
- name: create_release
uses: actions/create-release@v1
id: create_release
with:
draft: false
prerelease: false
release_name: ${{ steps.version.outputs.version }}
tag_name: ${{ github.ref }}
body_path: /home/runner/work/toot2toulouse/toot2toulouse/.github/workflows/LATEST.md
body-: Release created by Tag-creation
env:
GITHUB_TOKEN: ${{ github.token }}
- name: upload zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /home/runner/work/out/zip/t2t-${{ github.ref_name }}.zip
asset_name: t2t-${{ github.ref_name }}.zip
asset_content_type: application/zip
- name: upload tar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: /home/runner/work/out/zip/t2t-${{ github.ref_name }}.tar.gz
asset_name: t2t-${{ github.ref_name }}.tar.gz
asset_content_type: application/gzip