Skip to content

Commit

Permalink
ci: enable promotion across different branches
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
jnsgruk committed Feb 7, 2024
1 parent aae4357 commit 85a929a
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions .github/workflows/promote-to-stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,37 @@ permissions:
issues: write

jobs:
promote:
name: ⬆️ Promote to stable
promote-latest:
name: ⬆️ Promote to latest/stable
environment: "Candidate Branch"
runs-on: ubuntu-latest
if: |
( !github.event.issue.pull_request )
&& contains(github.event.comment.body, '/promote ')
&& contains(github.event.comment.body, 'latest/stable')
&& contains(github.event.issue.body, 'latest/stable')
&& contains(github.event.*.labels.*.name, 'testing')
steps:
- name: ⬆️ Promote to stable
- name: ⬆️ Promote to latest/stable
uses: snapcrafters/ci/promote-to-stable@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
store-token: ${{ secrets.SNAP_STORE_STABLE }}

promote-preview:
name: ⬆️ Promote to preview/stable
environment: "Preview Candidate Branch"
runs-on: ubuntu-latest
if: |
( !github.event.issue.pull_request )
&& contains(github.event.comment.body, '/promote ')
&& contains(github.event.comment.body, 'preview/stable')
&& contains(github.event.issue.body, 'preview/stable')
&& contains(github.event.*.labels.*.name, 'testing')
steps:
- name: ⬆️ Promote to preview/stable
uses: snapcrafters/ci/promote-to-stable@main
with:
channel: preview/stable
github-token: ${{ secrets.GITHUB_TOKEN }}
store-token: ${{ secrets.SNAP_STORE_STABLE }}

0 comments on commit 85a929a

Please sign in to comment.