Skip to content

Commit

Permalink
CLI-1211: Automate release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed Nov 14, 2023
1 parent c7f65e1 commit c1134a5
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/do-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish release on CCB approval
on:
workflow_dispatch:
schedule:
- cron: '0 * * * *'
jobs:
publish-release:
runs-on: ubuntu-22.04
name: Publish release on CCB approval
steps:
- name: Get reviewed release
run: |
FIX_VERSION=$(curl --request GET \
--url "$JIRA_BASE_URL/rest/api/3/search?jql=project%20%3D%20CLI%20AND%20issuetype%20%3D%20Release%20AND%20status%20%3D%20Reviewed" \
--user "$JIRA_USER_EMAIL:$JIRA_API_TOKEN" \
--header 'Accept: application/json' | jq -r '.issues[0].fields.fixVersions[0].name' | sed 's/Acquia CLI //')
echo "FIX_VERSION=$FIX_VERSION" >> $GITHUB_ENV
env:
JIRA_BASE_URL: ${{ vars.JIRA_BASE_URL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
- name: Publish release
if: env.FIX_VERSION != ''
run: |
gh release edit $FIX_VERSION --prerelease=false --latest

0 comments on commit c1134a5

Please sign in to comment.