Skip to content

Commit 9a9a98f

Browse files
committed
don't use GH action for publish so that we can control version
1 parent e83632c commit 9a9a98f

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

.github/workflows/publish_beta.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Publish Beta
1+
name: Publish
22
on:
33
push:
44
branches: [ 1.0.0 ]
55
jobs:
6-
publish_beta:
6+
publish:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/checkout@v2
@@ -13,12 +13,11 @@ jobs:
1313
- uses: gittools/actions/gitversion/[email protected]
1414
with:
1515
versionSpec: '6.0.x'
16-
- id: determine_version
17-
uses: gittools/actions/gitversion/[email protected]
18-
- name: Publish beta CSharpier dotnet tool on push
19-
uses: alirezanet/[email protected]
20-
with:
21-
VERSION_STATIC: ${{ env.branchName }}-beta${{ env.commitsSinceVersionSource }}
22-
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
23-
PROJECT_FILE_PATH: Src/CSharpier.Cli/CSharpier.Cli.csproj
24-
TAG_FORMAT: "*"
16+
- uses: gittools/actions/gitversion/[email protected]
17+
- run: |
18+
dotnet pack Src/CSharpier.Cli/CSharpier.Cli.csproj -c Release /p:Version=${{env.VERSION}} -o dist
19+
dotnet nuget push ./dist/CSharpier.${{env.VERSION}}.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json
20+
git tag ${{env.VERSION}}
21+
git push origin ${{env.VERSION}}
22+
env:
23+
VERSION: ${{env.branchName}}-alpha${{env.commitsSinceVersionSource}}

0 commit comments

Comments
 (0)