build: Snap in CI
This commit is contained in:
parent
18b270a15c
commit
c44f6525fb
2 changed files with 39 additions and 2 deletions
15
.github/workflows/main_deploy.yaml
vendored
15
.github/workflows/main_deploy.yaml
vendored
|
|
@ -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
.github/workflows/release.yaml
vendored
26
.github/workflows/release.yaml
vendored
|
|
@ -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 }}
|
||||
Loading…
Add table
Reference in a new issue