Skip to content

Commit

Permalink
Release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
sevensolutions committed Oct 5, 2024
1 parent 2ba45f0 commit 072dd05
Showing 1 changed file with 30 additions and 20 deletions.
50 changes: 30 additions & 20 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ on:
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
Expand Down Expand Up @@ -36,29 +39,36 @@ jobs:
run-id: ${{ github.event.inputs.runId }}

# Read version
- name: read version
- name: read and verify version
run: |
version=`cat ./version/version`
echo '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
# - 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
# # 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

0 comments on commit 072dd05

Please sign in to comment.