Skip to content

Promote edge versions of checkbox to beta #43

Promote edge versions of checkbox to beta

Promote edge versions of checkbox to beta #43

name: Beta version of checkbox
run-name: Promote edge versions of checkbox to beta
on:
push:
branches:
- beta
workflow_dispatch:
jobs:
should-run:
runs-on: ubuntu-latest
steps:
- name: Setup the gh repository and install gh
run: |
which curl || (sudo apt update && sudo apt install curl -y)
sudo curl https://cli.github.com/packages/githubcli-archive-keyring.gpg --output /usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --import /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --fingerprint "2C6106201985B60E6C7AC87323F3D4EA75716059"
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update -qq
sudo apt install -qq -y gh
- name: Checkout checkbox monorepo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Verify Promotion Conditions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# check if can_promote but ignore (only print an error) if the workflow was manually triggered
tools/release/can_promote_edge.py || ${{ github.event_name == 'workflow_dispatch' }}
release-notes:
needs: should-run
runs-on: ubuntu-latest
steps:
- name: Checkout checkbox monorepo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup the gh repository and install gh
run: |
which curl || (sudo apt update && sudo apt install curl -y)
sudo curl https://cli.github.com/packages/githubcli-archive-keyring.gpg --output /usr/share/keyrings/githubcli-archive-keyring.gpg
sudo chmod go+r /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --import /usr/share/keyrings/githubcli-archive-keyring.gpg
gpg --fingerprint "2C6106201985B60E6C7AC87323F3D4EA75716059"
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null
sudo apt update -qq
sudo apt install -qq -y gh
- name: Generate the github release note
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LP_CREDENTIALS: ${{ secrets.LP_CREDS }}
CHECKBOX_REPO: ${{ github.repository }}
run: |
gh release create $(git describe --tags --abbrev=0 --match v*) -d --generate-notes
checkbox_deb_packages:
needs: should-run
name: Checkbox Debian packages
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt update -qq
sudo apt install -qq -y python3-launchpadlib
- name: Checkout checkbox monorepo
uses: actions/checkout@v4
- name: Copy deb packages from edge to beta ppa
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LP_CREDENTIALS: ${{ secrets.LP_CREDS }}
CHECKBOX_REPO: ${{ github.repository }}
run: |
tools/release/lp_copy_packages.py checkbox-dev edge checkbox-dev beta
checkbox_core_snap:
needs: should-run
name: Checkbox core snap packages
runs-on: ubuntu-latest
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }}
steps:
- name: Setup Snapcraft
run: |
sudo snap install snapcraft --classic
- name: Promote checkbox core snaps to the beta channel
env:
SNAPCRAFT_HAS_TTY: "true" # this is necessary because snapcraft will not allow --yes for promotions of the edge channel
run: |
# Note: using `yes |` instead of `--yes` because snapcraft will
# refuse to non-interactively promote a snap from the edge
# channel if it is done without any branch qualifiers
yes | snapcraft promote checkbox16 --from-channel latest/edge --to-channel latest/beta
yes | snapcraft promote checkbox18 --from-channel latest/edge --to-channel latest/beta
yes | snapcraft promote checkbox20 --from-channel latest/edge --to-channel latest/beta
yes | snapcraft promote checkbox22 --from-channel latest/edge --to-channel latest/beta
yes | snapcraft promote checkbox24 --from-channel latest/edge --to-channel latest/beta
checkbox_snap:
needs: should-run
name: Checkbox snap packages
runs-on: ubuntu-latest
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT7_CREDS }}
steps:
- name: Setup Snapcraft
run: |
sudo snap install snapcraft --classic
- name: Promote checkbox snaps to the beta channel
env:
SNAPCRAFT_HAS_TTY: "true" # this is necessary because snapcraft will not allow --yes for promotions of the edge channel
run: |
# Note: using `yes |` instead of `--yes` because snapcraft will
# refuse to non-interactively promote a snap from the edge
# channel if it is done without any branch qualifiers
yes | snapcraft promote checkbox --from-channel uc16/edge --to-channel uc16/beta
yes | snapcraft promote checkbox --from-channel uc18/edge --to-channel uc18/beta
yes | snapcraft promote checkbox --from-channel uc20/edge --to-channel uc20/beta
yes | snapcraft promote checkbox --from-channel uc22/edge --to-channel uc22/beta
yes | snapcraft promote checkbox --from-channel uc24/edge --to-channel uc24/beta
yes | snapcraft promote checkbox --from-channel 16.04/edge --to-channel 16.04/beta
yes | snapcraft promote checkbox --from-channel 18.04/edge --to-channel 18.04/beta
yes | snapcraft promote checkbox --from-channel 20.04/edge --to-channel 20.04/beta
yes | snapcraft promote checkbox --from-channel 22.04/edge --to-channel 22.04/beta
yes | snapcraft promote checkbox --from-channel 24.04/edge --to-channel 24.04/beta
yes | snapcraft promote checkbox --from-channel 22.04/edge --to-channel latest/beta