Skip to content

Publish PREVIEW artifacts to GITHUB #12

Publish PREVIEW artifacts to GITHUB

Publish PREVIEW artifacts to GITHUB #12

name: Publish artifacts to Github
on: workflow_dispatch
jobs:
main_job:
runs-on: ubuntu-latest
permissions:
contents: write # required for pushing the tag
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Define Version at GHENV_PACKAGEVERSION
run: |
chmod +x ./.github/workflows/FormatSemver.sh
./.github/workflows/FormatSemver.sh "${{ vars.SharpGLTF_Version }}-Preview-DATE-TIME" >> $GITHUB_ENV
- name: build
uses: ./.github/actions/Build
with:
nuget-semver: "${{env.GHENV_PACKAGEVERSION}}"
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
name: nuget-packages
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.SharpGLTF_PublishToGithub}} --source https://nuget.pkg.github.com/${{github.repository_owner}}
- name: create tag
uses: ./.github/actions/PushGithubTag
with:
tag-name: "${{env.GHENV_PACKAGEVERSION}}"
message: "new tag for ${{env.GHENV_PACKAGEVERSION}}"