Skip to content

Switch Jira issue sync from workflow to bot (#106) #61

Switch Jira issue sync from workflow to bot (#106)

Switch Jira issue sync from workflow to bot (#106) #61

Workflow file for this run

name: Release to channels
on:
push:
branches:
- 3.4/*
- 3.5/*
jobs:
release_checks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Extract branch metadata
shell: bash
run: |
BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
echo "branch=${BRANCH}" >> $GITHUB_OUTPUT
echo "risk=${BRANCH##*\/}" >> $GITHUB_OUTPUT
echo "track=${BRANCH%*\/*}" >> $GITHUB_OUTPUT
id: branch_metadata
- name: Check consistency between metadata and release branch
run: |
RAW_VERSION=$(yq '(.version|split("-"))[0]' snap/snapcraft.yaml)
MAJOR_MINOR_VERSION=$(echo $RAW_VERSION | sed -n "s/\(^[0-9]*\.[0-9]*\).*/\1/p")
if [ "${MAJOR_MINOR_VERSION}" != "${{ steps.branch_metadata.outputs.track }}" ]; then exit 1; fi
continue-on-error: false
- name: Output Branch Metadata information
run: |
echo "Branch: ${{ steps.branch_metadata.outputs.branch }}"
echo "Track: ${{ steps.branch_metadata.outputs.track }}"
echo "Risk: ${{ steps.branch_metadata.outputs.risk }}"
outputs:
branch: ${{ steps.branch_metadata.outputs.branch }}
track: ${{ steps.branch_metadata.outputs.track }}
risk: ${{ steps.branch_metadata.outputs.risk }}
build:
uses: ./.github/workflows/ci.yaml
secrets: inherit
publish:
name: Publish Snap
runs-on: ubuntu-latest
timeout-minutes: 15
needs:
- build
- release_checks
steps:
- name: Download built snap file
uses: actions/download-artifact@v4
with:
name: ${{ needs.build.outputs.snap-file }}
path: .
- name: Publish built snap to Store
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ needs.build.outputs.snap-file }}
release: ${{ needs.release_checks.outputs.track }}/${{ needs.release_checks.outputs.risk }}