Merge pull request #9 from Falki-git/dev #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build template | |
on: | |
push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download NuGet | |
id: download-nuget | |
run: sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe | |
- name: Install jq | |
uses: dcarbone/[email protected] | |
- name: Build template | |
id: build-template | |
run: pwsh -NoProfile -ExecutionPolicy Bypass -File "BuildPackage.ps1" | |
- name: Extract current version | |
id: get-version | |
run: | | |
filepath=$(ls -1 dist/SpaceWarp.Template.*.nupkg | head -n 1) | |
filename=$(basename $filepath) | |
echo "Artifact name is $filename" | |
echo "artifact_name=$filename" >> $GITHUB_ENV | |
echo "artifact_path=$filepath" >> $GITHUB_ENV | |
- name: Upload zip as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.artifact_name }} | |
path: ${{ env.artifact_path }} |