Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
APIGOV-25964 - test new release actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dfeldick committed Oct 12, 2023
1 parent 8fdc8d0 commit bada0d0
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 10 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/create-tag-for-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# This action gets triggered by a closed PR on branch named 'APIGOV-UpdateSDK'
name: Create tag for release

on:
pull_request:
types:
- closed

jobs:
if_SDK_update_merged:
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'APIGOV-UpdateSDK')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Bump tag version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
# by default, this action creates a tag with a 'v' prefix, and bumps the patch version.
# See https://github.com/mathieudutour/github-tag-action to customize these rules.
github_token: ${{ secrets.ACTION_ACCESS_TOKEN }}

- name: Show the new tag
run: |
echo "previous tag ${{ steps.tag_version.outputs.previous_tag }}
echo "new tag ${{ steps.tag_version.outputs.new_tag }}
- name: Create a GitHub release
uses: ncipollo/release-action@v1
with:
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
49 changes: 49 additions & 0 deletions .github/workflows/update-sdk-for-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# this action is triggered by selecting the action in the github UI and then clicking "run workflow"
name: Update SDK version for release

on: workflow_dispatch

jobs:
updateAndCreatePR:
env:
GOFLAGS: "-mod=mod"
GOWORK: "off"
defaults:
run:
working-directory: .
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21

- name: Get latest SDK version
run: |
export LATEST_REMOTE_TAG_CMD="git ls-remote --tags --refs --sort='version:refname' REMOTE_REPO | grep -Eo 'v?[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,3}$' | tail -1"
REMOTE_REPO_PATH="https://github.com/Axway/agent-sdk"
CMD=${LATEST_REMOTE_TAG_CMD/"REMOTE_REPO"/${REMOTE_REPO_PATH}}
export SDK_VERSION=$(eval $CMD)
echo "SDK_VERSION=${SDK_VERSION}" >> $GITHUB_ENV
- name: Update SDK version in go.mod
working-directory: .
run: |
echo "SDK_VERSION is ${{ env.SDK_VERSION }}"
make dep-version sdk=v1.1.61
- name: Create Pull Request
id: cpr
uses: peter-evans/[email protected]
with:
branch: APIGOV-UpdateSDK
commit-message: 'Update to SDK ${{ env.SDK_VERSION }}'
title: 'APIGOV-UpdateSDK - Update to SDK ${{ env.SDK_VERSION }}'
delete-branch: true
reviewers: dfeldick

- name: Enable Pull Request Automerge
run: gh pr merge APIGOV-UpdateSDK --admin --merge --subject "Merge branch APIGOV-UpdateSDK"
env:
GH_TOKEN: ${{ secrets.ACTION_ACCESS_TOKEN }}
20 changes: 10 additions & 10 deletions .github/workflows/webmethods-agents-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,14 @@ jobs:
overwrite: true
body: "webMethods Traceability Agent YAML - ${{ github.ref }}"

notifyTeamsChannel:
needs: [buildDiscoveryAgent, buildTraceabilityAgent]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# notifyTeamsChannel:
# needs: [buildDiscoveryAgent, buildTraceabilityAgent]
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3

- name: Notify Teams channel
env:
TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }}
TAG: ${{ github.ref_name }}
run: ./release.sh
# - name: Notify Teams channel
# env:
# TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }}
# TAG: ${{ github.ref_name }}
# run: ./release.sh

0 comments on commit bada0d0

Please sign in to comment.