Skip to content

Commit

Permalink
Update publish-snaps.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
matifali authored Dec 20, 2024
1 parent 2380ea4 commit 64f308a
Showing 1 changed file with 1 addition and 20 deletions.
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

0 comments on commit 64f308a

Please sign in to comment.