Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/code-health-foas-lib.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Code Health Foas Library'
name: 'Code Health FOAS Library'
on:
push:
branches:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/code-health-foascli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ on:
push:
branches:
- main
paths:
paths:
- 'tools/cli/**'
- 'tools/foas/**'
- '.github/workflows/code-health-foascli.yml'
pull_request:
branches:
- main
paths:
- 'tools/cli/**'
- 'tools/foas/**'
- '.github/workflows/code-health-foascli.yml'
workflow_dispatch: {}
workflow_call: {}
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/release-foas-lib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: 'FOAS Library New Release'
run-name: 'Release foas ${{ inputs.version_number }} (skip tests: ${{ inputs.skip_tests }})'

# Used for releasing the tools/foas Go library module.
on:
workflow_dispatch:
inputs:
version_number:
description: 'Version number (e.g., v1.0.0, v1.0.0-pre, v1.0.0-pre1)'
required: true
skip_tests:
description: 'Set value to `true` to skip tests, default is `false`'
default: 'false'

permissions:
contents: read

jobs:
run-tests:
if: >-
!cancelled()
&& inputs.skip_tests == 'false'
uses: ./.github/workflows/code-health-foas-lib.yml

create-tag:
runs-on: ubuntu-latest
needs: [ run-tests ]
permissions:
contents: write # required to push the release tag
# Tag is created only when tests pass (or are explicitly skipped).
if: >-
!cancelled()
&& !contains(needs.*.result, 'failure')
steps:
- name: Validation of version format
run: |
echo "${{ inputs.version_number }}" | grep -P '^v\d+\.\d+\.\d+(-pre[A-Za-z0-9-]*)?$'
- name: Checkout
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
- name: Get the latest commit SHA
id: get-sha
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
- name: Create Go submodule tag for tools/foas
uses: rickstaa/action-create-tag@a1c7777fcb2fee4f19b0f283ba888afa11678b72
with:
tag: tools/foas/${{ inputs.version_number }}
commit_sha: ${{ steps.get-sha.outputs.sha }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_passphrase: ${{ secrets.PASSPHRASE }}

failure-handler:
name: Failure Handler
Comment thread
yelizhenden-mdb marked this conversation as resolved.
needs: [ run-tests, create-tag ]
if: ${{ always() && contains(needs.*.result, 'failure') }}
uses: ./.github/workflows/failure-handler.yml
with:
env: "prod"
release_name: "FOAS Library"
team_id: ${{ vars.JIRA_TEAM_ID_APIX_PLATFORM }}
secrets:
jira_api_token: ${{ secrets.JIRA_API_TOKEN }}
Loading