release #1
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: | |
tags: | |
- v* | |
workflow_run: | |
workflows: [build] | |
types: [completed] | |
env: | |
DOTNET_VERSION: '7.0' | |
name: release | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout main | |
uses: actions/checkout@main | |
- name: setup dotnet ${{ env.DOTNET_VERSION }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
source-url: https://nuget.pkg.github.com/azure-devops-compliance/index.json | |
env: | |
NUGET_AUTH_TOKEN: ${ {secrets.PAT }} | |
- name: dotnet publish | |
run: dotnet publish -o ./out Functions/Functions.csproj -c release | |
- name: zip | |
run: | | |
pushd ./out | |
zip -r ../release.zip . | |
popd | |
- name: create release | |
id: release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
body: "" | |
draft: false | |
prerelease: false | |
- name: upload assets | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.release.outputs.upload_url }} | |
asset_path: release.zip | |
asset_name: release.zip | |
asset_content_type: application/zip |