Skip to content

Commit c3dff2c

Browse files
committed
Create a tag for pre-releases
1 parent 2f2a49a commit c3dff2c

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,19 @@ jobs:
3838
publish-prerelease:
3939
runs-on: macos-latest
4040
needs: package
41-
if: github.ref == 'refs/heads/main'
41+
if: github.ref == 'refs/heads/deploy'
4242
name: Publish package on github.com
4343
steps:
44-
- run: echo version -- ${{ needs.package.outputs.version }} --
45-
- run: echo dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text
46-
- run: echo dotnet nuget push "**/*.nupkg" --source github
44+
- name: Create tag
45+
uses: actions/github-script@v3
46+
with:
47+
github-token: ${{ github.token }}
48+
script: |
49+
github.git.createRef({
50+
owner: context.repo.owner,
51+
repo: context.repo.repo,
52+
ref: "refs/tags/${{ needs.package.outputs.version }}",
53+
sha: context.sha
54+
})
55+
- run: dotnet nuget add source https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json --name github --username ${{ github.repository_owner }} --password ${{ github.token }} --store-password-in-clear-text
56+
- run: dotnet nuget push "**/*.nupkg" --source github

0 commit comments

Comments
 (0)