Commit for v0.3.0 #24
Workflow file for this run
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow | |
name: Azure Functions App / Create ZIP artifact | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
workflow_dispatch: | |
permissions: | |
packages: read | |
contents: read | |
jobs: | |
create-artifact: | |
name: Create artifact | |
runs-on: ubuntu-latest | |
env: | |
EVENT_TYPE: ${{ github.event_name }} | |
TAG_NAME: ${{ github.ref_name }} | |
steps: | |
- name: Generate artifact tag value | |
shell: pwsh | |
run: | | |
"ARTIFACT_TAG=$($env:EVENT_TYPE -eq "push" ? $env:TAG_NAME : $([datetime]::Now.ToString("yyyyMMddTHHmmss")))" | Out-File -FilePath $env:GITHUB_ENV -Append | |
- name: "Checkout GitHub Action" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET SDK | |
uses: actions/setup-dotnet@v4 | |
with: | |
global-json-file: global.json | |
- name: Install .NET tools | |
run: dotnet tool restore | |
- name: Update project files with gitversion | |
run: dotnet tool run dotnet-gitversion /updateprojectfiles | |
- name: Configure NuGet | |
run: | | |
dotnet nuget add source https://nuget.pkg.github.com/Smalls1652/index.json --name github --username Smalls1652 --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --configfile ./nuget.config | |
- name: Restore project | |
run: | | |
dotnet restore ./src/FunctionApp/ | |
- name: Build project | |
run: | | |
dotnet publish ./src/FunctionApp/ --configuration Release --output ./output/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "SmallsOnline-PasswordExpirationNotifier-FunctionApp_${{ env.ARTIFACT_TAG }}" | |
path: ./output/* |