Skip to content

Release

Release #10

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
runId:
description: "The id of the workflow run to create the release from"
required: true
version:
description: "The version for the release"
required: true
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
# Download artifacts
- uses: actions/download-artifact@master
with:
name: version
path: version # Note: This downloads into a folder "version"
github-token: ${{ github.token }}
run-id: ${{ github.event.inputs.runId }}
- uses: actions/download-artifact@master
with:
name: nomad_iis
path: nomad_iis
github-token: ${{ github.token }}
run-id: ${{ github.event.inputs.runId }}
- uses: actions/download-artifact@master
with:
name: nomad_iis_mgmt_api
path: nomad_iis_mgmt_api
github-token: ${{ github.token }}
run-id: ${{ github.event.inputs.runId }}
# Read version
- name: read and verify version
run: |
version=`cat ./version/version`
echo "Release Version: ${{ github.event.inputs.version }}"
echo "Version in Build: ${version}"
echo "VERSION=${version}" >> $GITHUB_ENV
if [ "${{ github.event.inputs.version }}" -neq "${version}" ]
then
echo "The specified release version doesn't match the version in the build. Please update PluginInfo.cs first."
exit 1
fi
# Zip the artifacts
# - uses: vimtor/action-zip@v1.2
# with:
# files: ./nomad_iis
# dest: nomad_iis.zip
# - uses: vimtor/action-zip@v1.2
# with:
# files: ./nomad_iis_mgmt_api
# dest: nomad_iis_mgmt_api.zip
# # Create the Release
# - name: create release
# uses: softprops/action-gh-release@v2
# with:
# name: v${{ env.VERSION }}
# tag_name: v${{ env.VERSION }}
# draft: true
# files: |
# nomad_iis.zip
# nomad_iis_mgmt_api.zip