Skip to content

[DPE-3935] Fix failing tests (#93) #48

[DPE-3935] Fix failing tests (#93)

[DPE-3935] Fix failing tests (#93) #48

Workflow file for this run

name: Release to 3.4 channels
on:
push:
branches:
- 3.4/*
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
publish:
name: Publish Snap
runs-on: ubuntu-latest
timeout-minutes: 5
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 }}