Skip to content

Commit c37ec98

Browse files
committed
try url for nuget environment
1 parent 93a7c91 commit c37ec98

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/publish.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,26 @@ on:
77
env:
88
CONFIGURATION: Release
99
jobs:
10+
set_version:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Set Versions
14+
uses: actions/github-script@v4
15+
id: set_version
16+
with:
17+
script: |
18+
const tag = context.ref.substring(10)
19+
const no_v = tag.replace('v', '')
20+
const dash_index = no_v.lastIndexOf('-')
21+
const no_dash = (dash_index > -1) ? no_v.substring(0, dash_index) : no_v
22+
core.setOutput('tag', tag)
23+
core.setOutput('no-v', no_v)
24+
core.setOutput('no-dash', no_dash)
25+
1026
build:
1127
environment:
1228
name: nuget
13-
url: https://www.nuget.org/packages/MiniScaffold/${{ github.ref_name }}
29+
url: https://www.nuget.org/packages/MiniScaffold/${{ needs.set_version.outputs.no-v }}
1430
runs-on: ubuntu-latest
1531
steps:
1632
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)