.github/workflows/CreateRelease.yml #8
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
on: | |
push: | |
paths: | |
- 'FunctionApp/**' | |
workflow_dispatch: | |
inputs: | |
messages: | |
description: 'Why are you running manually?' | |
required: false | |
default: 'Manual Run' | |
jobs: | |
Build-Nightly-Zip: | |
runs-on: ubuntu-latest | |
#if: github.sha == github.event.head_commit.id # Only run the job if the commit is the latest one | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4.1.2 | |
with: | |
ref: ${{ github.head_ref}} | |
- name: Run-Build-Script | |
shell: pwsh | |
run: | | |
./Build/Build-Zip-File.ps1 -Path ".\Nightly" | |
- name: Bump version and push tag | |
id: bump_version | |
uses: anothrNick/github-tag-action@1.36.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DEFAULT_BUMP: patch # Default to patch if no keywords are found | |
WITH_V: true # Prefix the tag with 'v' | |
PRE_RELEASE: true # Enable pre-release | |
VERBOSE: true | |
- name: Create Release | |
# You may pin to the exact commit or the version. | |
# uses: ncipollo/release-action@2c591bcc8ecdcd2db72b97d6147f871fcd833ba5 | |
uses: ncipollo/release-action@v1.14.0 | |
with: | |
# An optional flag which indicates if we should update a release if it already exists. Defaults to false. | |
allowUpdates: true # optional, default is | |
# An optional flag which indicates if artifact read or upload errors should fail the build. | |
artifactErrorsFailBuild: true # optional, default is | |
# An optional set of paths representing artifacts to upload to the release. This may be a single path or a comma delimited list of paths (or globs) | |
artifacts: ./Nightly/FunctionApp.zip # optional | |
# The content type of the artifact. Defaults to raw | |
generateReleaseNotes: true # optional, default is false | |
# Indicates if the release should be the "latest" release or not. | |
prerelease: true | |
replacesArtifacts: true # optional, default is true | |
# Optionally specify the repo where the release should be generated. Defaults to current repo | |
tag: ${{ steps.bump_version.outputs.new_tag }} # optional, default is | |
# The Github token. | |
token: ${{ secrets.GITHUB_TOKEN }} # optional, default is ${{ github.token }} |