Skip to content

Commit 52c64d7

Browse files
committed
test v3
1 parent e379434 commit 52c64d7

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

.github/workflows/release.yaml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,7 @@ on:
66
- "*.*.*"
77

88
jobs:
9-
extractversion:
10-
name: Extract version
11-
runs-on: ubuntu-latest
12-
outputs:
13-
version: ${{ steps.extractversion.outputs.version }}
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v1
17-
- name: Extract version from Git
18-
id: extractversion
19-
run: echo "::set-output name=version::$(git describe)"
20-
- name: github.ref
21-
run: echo "${{ github.ref }} ${{ github.ref_name }}"
22-
9+
2310
build:
2411
name: Build release artifacts
2512
needs: extractversion
@@ -48,19 +35,20 @@ jobs:
4835
- name: Publish .NET app
4936
env:
5037
RID: ${{ matrix.targets }}
51-
VERSION: ${{ needs.extractversion.outputs.version }}
38+
VERSION: ${{ github.ref_name }}
5239
run: dotnet publish -c Release -r $RID --self-contained true -p:DebugType=None -p:DebugSymbols=false -p:PublishSingleFile=true CliSample/CliSample.csproj --output /home/runner/work/clis/$RID
5340
- name: Package assets
5441
env:
5542
RID: ${{ matrix.targets }}
56-
VERSION: ${{ needs.extractversion.outputs.version }}
43+
VERSION: ${{ github.ref_name }}
5744
run: |
45+
ls /home/runner/work/clis/
5846
zip -r /home/runner/work/release/clisample-$VERSION-$RID.zip /home/runner/work/clis/$RID/*
5947
- name: Upload artifacts
6048
uses: actions/upload-artifact@v2
6149
with:
62-
name: clisample-${{ needs.extractversion.outputs.version }}-${{ matrix.targets }}.zip
63-
path: "/home/runner/work/release/clisample-${{ needs.extractversion.outputs.version }}-${{ matrix.targets }}.zip"
50+
name: clisample-${{ github.ref_name }}-${{ matrix.targets }}.zip
51+
path: "/home/runner/work/release/clisample-${{ github.ref_name }}-${{ matrix.targets }}.zip"
6452

6553
publish:
6654
name: Publish release

0 commit comments

Comments
 (0)