Skip to content

fix: publish all releases to stable snap channel #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 1 addition & 20 deletions .github/workflows/publish-snaps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@ on:
coder_version:
description: "Coder version"
required: true
release_channel:
description: "Release channel"
required: true
type: choice
options:
- stable
- mainline
repository_dispatch:
types: [coder-release]

Expand All @@ -35,18 +28,8 @@ jobs:
run: |
if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
echo "coder_version=${{ github.event.client_payload.coder_version }}" >> "$GITHUB_OUTPUT"
if [[ "${{ github.event.client_payload.release_channel }}" == "stable" ]]; then
echo "release_channel=stable" >> "$GITHUB_OUTPUT"
else
echo "release_channel=candidate" >> "$GITHUB_OUTPUT"
fi
elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
echo "coder_version=${{ github.event.inputs.coder_version }}" >> "$GITHUB_OUTPUT"
if [[ "${{ github.event.inputs.release_channel }}" == "stable" ]]; then
echo "release_channel=stable" >> "$GITHUB_OUTPUT"
else
echo "release_channel=candidate" >> "$GITHUB_OUTPUT"
fi
else
echo "Unknown event: ${{ github.event_name }}"
exit 1
Expand All @@ -59,10 +42,8 @@ jobs:

- uses: snapcore/action-build@v1
id: build
if: ${{ steps.metadata.outputs.release_channel == 'mainline' }}


- uses: snapcore/action-publish@v1
if: ${{ steps.metadata.outputs.release_channel == 'mainline' }}
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
with:
Expand Down