Skip to content

Commit

Permalink
build: Snap in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
krille-chan committed Aug 7, 2023
1 parent 18b270a commit c44f652
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/main_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,18 @@ jobs:
bundle update fastlane
bundle exec fastlane deploy_internal_test
cd ..
deploy_snap:
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap.outputs.snap }}
steps:
- uses: actions/checkout@v3
- uses: snapcore/action-build@v1
id: build-snap
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
with:
snap: ${{ steps.build-snap.outputs.snap }}
release: 'edge'
26 changes: 24 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,32 @@ jobs:
bundle install
bundle update fastlane
bundle exec fastlane deploy_internal_test
RELEASE_TYPE=$(echo "${GITHUB_REF_NAME}" | awk -F"/" '{print $3}')
if [ "$RELEASE_TYPE" = "rc" ]; then
if [[ $GITHUB_REF_NAME == rc* ]]; then
bundle exec fastlane deploy_candidate
else
bundle exec fastlane deploy_release
fi
cd ..
deploy_snap:
runs-on: ubuntu-latest
outputs:
snap-file: ${{ steps.build-snap.outputs.snap }}
steps:
- uses: actions/checkout@v3
- uses: snapcore/action-build@v1
id: build-snap
- name: Set release type
id: set-release
run: |
if [[ "${GITHUB_REF_NAME}" == rc* ]]; then
echo "::set-output name=release::candidate"
else
echo "::set-output name=release::stable"
fi
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
with:
snap: ${{ steps.build-snap.outputs.snap }}
release: ${{ steps.set-release.outputs.release }}

0 comments on commit c44f652

Please sign in to comment.