release #39
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
name: release | |
on: | |
workflow_dispatch: | |
inputs: | |
module: | |
description: 'Module' | |
required: true | |
type: choice | |
options: | |
- gosync | |
- adapters/azuread | |
- adapters/github | |
- adapters/opsgenie | |
- adapters/slack | |
- adapters/terraformcloud | |
version: | |
description: 'Version' | |
required: true | |
type: string | |
permissions: | |
contents: write | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Validate | |
run: | | |
if ! [[ "${{ inputs.version }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | |
exit 1 | |
fi | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
show-progress: false | |
- name: Bump Go Sync version | |
if: inputs.module == 'gosync' | |
run: git tag ${{ inputs.version }} | |
- name: Bump Adapter version | |
if: inputs.module != 'gosync' | |
run: git tag ${{ inputs.module }}/${{ inputs.version }} | |
- name: Push | |
run: git push origin --tags | |
- name: Create Go Sync Release | |
if: inputs.module == 'gosync' | |
id: create_gosync_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ inputs.version }} | |
release_name: ${{ inputs.module }} ${{ inputs.version }} | |
draft: false | |
prerelease: false | |
- name: Create Adapter Release | |
if: inputs.module != 'gosync' | |
id: create_adapter_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ inputs.module }}/${{ inputs.version }} | |
release_name: ${{ inputs.module }} ${{ inputs.version }} | |
draft: false | |
prerelease: false |