Skip to content

Fix more integration test snapshots. #434

Fix more integration test snapshots.

Fix more integration test snapshots. #434

Workflow file for this run

name: Pack
on:
push:
branches:
- \d+\.x
tags:
- \d+\.\d+\.\d+
workflow_call:
secrets:
CREATE_RELEASE_PAT:
required: true
jobs:
pack:
runs-on: ubuntu-latest
outputs:
semVer2: ${{ steps.nbgv.outputs.SemVer2 }}
isPreviewRelease: ${{ startsWith(steps.nbgv.outputs.PrereleaseVersionNoLeadingHyphen, 'preview') }}
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 #4.1.14
with:
fetch-depth: 0
submodules: 'true'
- name: Setup .NET
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # 4.0.1
with:
global-json-file: global.json
- name: Determine semantic version
uses: dotnet/nbgv@f088059084cb5d872e9d1a994433ca6440c2bf72 # 0.4.2
id: nbgv
- name: Replace NuGet version default value in templates
run: find -name template.json -exec sed -i "s/TEMPLATE_GREMLINQ_VERSION_DEFAULT_VALUE/${{ steps.nbgv.outputs.NuGetPackageVersion }}/g" {} \;
- name: Build
run: dotnet build ./${{ github.event.repository.name }}.sln -c Release -p:ContinuousIntegrationBuild=true
- name: Pack
run: dotnet pack ./${{ github.event.repository.name }}.sln -c Release --no-build
- name: Copy NuGet packages to artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # 4.4.0
with:
name: NuGetPackages
path: ./**/${{ github.event.repository.name }}.*.nupkg
if-no-files-found: error
- run: echo ${{ steps.nbgv.outputs.NuGetPackageVersion }} > Version
- name: Output version to artifacts
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # 4.4.0
with:
name: Version
path: Version
if-no-files-found: error
draft-release:
needs: [ pack ]
runs-on: ubuntu-latest
outputs:
releaseUploadUrl: ${{ steps.create_release.outputs.upload_url }}
releaseUploadId: ${{ steps.create_release.outputs.id }}
steps:
- name: Draft release
id: create_release
uses: release-drafter/release-drafter@3f0f87098bd6b5c5b9a36d49c41d998ea58f9348 # 6.0.0
with:
name: ${{ github.event.repository.name }} ${{ needs.pack.outputs.semVer2 }}
prerelease: ${{ needs.pack.outputs.isPreviewRelease }}
tag: ${{ needs.pack.outputs.semVer2 }}
commitish: ${{ github.ref }}
env:
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_PAT }}
release:
if: ${{ needs.pack.outputs.isPreviewRelease == 'false' }}
needs: [ draft-release ]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # 4.1.8
with:
name: NuGetPackages
- uses: shogo82148/actions-upload-release-asset@aac270e08f6b4547ada0b3800f88e1eb3ce9d400 # 1.7.7
with:
upload_url: ${{ needs.draft-release.outputs.releaseUploadUrl }}
asset_path: '**/${{ github.event.repository.name }}.*.nupkg'
github_token: ${{ secrets.CREATE_RELEASE_PAT }}
- uses: eregon/publish-release@01df127f5e9a3c26935118e22e738d95b59d10ce # 1.0.6
with:
release_id: ${{ needs.draft-release.outputs.releaseUploadId }}
env:
GITHUB_TOKEN: ${{ secrets.CREATE_RELEASE_PAT }}