40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Promote to public (beta channel)
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
tag:
|
|
description: 'Tag to publish (e.g. v0.10.0-beta1)'
|
|
required: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
promote:
|
|
runs-on: ubuntu-latest
|
|
environment: production
|
|
steps:
|
|
- name: Checkout private repo at the tag
|
|
uses: actions/checkout@v5
|
|
with:
|
|
ref: ${{ inputs.tag }}
|
|
fetch-depth: 0
|
|
path: src
|
|
- name: Checkout public repo
|
|
uses: actions/checkout@v5
|
|
with:
|
|
repository: ${{ vars.PUBLIC_REPO_SLUG }}
|
|
token: ${{ secrets.PUBLIC_REPO_TOKEN }}
|
|
fetch-depth: 0
|
|
path: pub
|
|
- name: Promote (clean release commit + tag)
|
|
run: |
|
|
git config --global user.name 'clusev-release'
|
|
git config --global user.email 'release@clusev'
|
|
chmod +x src/scripts/promote.sh
|
|
src/scripts/promote.sh "$PWD/src" "${{ inputs.tag }}" "$PWD/pub" "Release ${{ inputs.tag }}"
|
|
- name: Push to public
|
|
run: |
|
|
git -C pub push origin HEAD:main
|
|
git -C pub push origin "refs/tags/${{ inputs.tag }}"
|