Skip to content

Commit

Permalink
Merge pull request #171 from AdrianJSClark/fix-documentation-publish
Browse files Browse the repository at this point in the history
Fix Documentation Publish
  • Loading branch information
AdrianJSClark committed Apr 8, 2023
2 parents fa0fbe3 + 5cdc4b8 commit 32fd960
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ jobs:
with:
fetch-depth: 0 # Required for MinVer to work properly

- name: 'Setup .NET SDK'
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

- name: 'Setup .NET SDK'
uses: actions/setup-dotnet@v1
with:
Expand Down Expand Up @@ -68,13 +63,13 @@ jobs:
run: Get-ChildItem -Path src\*\bin\Release\* -Recurse -Include *.nupkg | Copy-Item -Container:$false

- name: 'Upload Artifacts'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: NuGet Packages
path: Aydsko.*.nupkg

- name: 'Upload Release Notes'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: Release Notes
path: 'src\Aydsko.iRacingData\Package Release Notes.txt'
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,33 @@ jobs:
uses: ./.github/workflows/_build-docs.yml

deploy:
name: Create Draft Release with NuGet Packages
name: Create Draft Release with NuGet Packages & Documentation Site
needs:
- build
- build-docs
runs-on: windows-latest
runs-on: ubuntu-latest

env:
DOTNET_NOLOGO: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true # Avoid pre-populating the NuGet package cache

steps:
- name: 'Checkout Code'
uses: actions/checkout@v2

- name: Download Artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3

- name: Setup .NET SDK
uses: actions/setup-dotnet@v3

- run: Compress-Archive -Path "Documentation Site/*" -DestinationPath DocumentationSite.zip
shell: pwsh

- name: Create Draft Release
shell: pwsh
# Can't just use wildcard in this command due to https://github.com/cli/cli/issues/5099 so use Get-Item
run: gh release create --repo "AdrianJSClark/aydsko-iracingdata" --draft --title "${{ github.ref_name }}" --notes-file "Release Notes\Package Release Notes.txt" "release-${{ github.ref_name }}" (Get-Item "NuGet Packages/*.nupkg","Documentation Site/*.zip")
run: |
gh release create --repo "AdrianJSClark/aydsko-iracingdata" --draft --title "${{ github.ref_name }}" --notes-file "Release Notes/Package Release Notes.txt" "release-${{ github.ref_name }}" (Get-Item "NuGet Packages/*.nupkg","DocumentationSite.zip")
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
build:
name: 'Publish Package'
runs-on: windows-latest
runs-on: ubuntu-latest

env:
DOTNET_NOLOGO: true
Expand All @@ -19,7 +19,7 @@ jobs:
- name: 'Check Tag Value'
run: echo ${{ github.event.release.tag_name }}

- uses: robinraju/release-downloader@v1.3
- uses: robinraju/release-downloader@v1.7
name: 'Download Package from Release'
with:
repository: 'AdrianJSClark/aydsko-iracingdata'
Expand All @@ -34,7 +34,7 @@ jobs:
run: Expand-Archive -Path DocumentationSite.zip -DestinationPath ./_site

- name: 'Upload Site Artifacts'
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: 'Documentation Site'
path: '_site'
Expand Down

0 comments on commit 32fd960

Please sign in to comment.