Skip to content

Commit

Permalink
Move and fix release note generation (infra) (#841)
Browse files Browse the repository at this point in the history
* Moved release note generation and env setup

* Also setup gh for the stable release workflow

* Update only after key verification

* Minor: update not interactive

* Better ubuntu-shell commands and verification

* Fixed users and paths
  • Loading branch information
Hook25 committed Nov 24, 2023
1 parent 2e57aba commit 16da765
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/checkbox-stable-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ jobs:
fetch-depth: 0
- name: Install dependencies
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: Edit the draft release and publish it
Expand Down
7 changes: 0 additions & 7 deletions .github/workflows/deb-beta-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,3 @@ jobs:
attempt_limit: 3
command: |
tools/release/release_deb_monorepo.py
- 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
30 changes: 30 additions & 0 deletions .github/workflows/release-notes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Beta release notes
run-name: Beta release notes for ${{ github.ref_name }}

on:
push:
tags:
- "v*"
workflow_dispatch:

jobs:
Release:
runs-on: [self-hosted, linux, large]
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: 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

0 comments on commit 16da765

Please sign in to comment.