Skip to content

Commit

Permalink
CI: create snap release
Browse files Browse the repository at this point in the history
  • Loading branch information
Mersho committed Feb 22, 2024
1 parent 0e210fe commit aafd5d0
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ jobs:
- conventions

runs-on: ubuntu-22.04
outputs:
upload_url: ${{ steps.prepare.outputs.upload_url }}
steps:
- uses: actions/checkout@v1
- name: Install snap tools
Expand All @@ -515,6 +517,14 @@ jobs:
# retry 3 times because of flakey nuget; TODO: remove retry when we migrate to .NET6 (removing LEGACY_FRAMEWORK support)
./scripts/snap_build.sh || ./scripts/snap_build.sh || ./scripts/snap_build.sh || ./scripts/snap_build.sh
- name: Find the snap file's path and name
id: find_snap_file
run: |
FILEPATH=$(ls *.snap)
FILENAME=$(basename $FILEPATH)
echo "file_path=$FILEPATH" >> $GITHUB_OUTPUT
echo "file_name=$FILENAME" >> $GITHUB_OUTPUT
- name: Install snap
# dangerous because it's a local snap (not one from the SnapStore)
run: sudo snap install --dangerous *.snap
Expand All @@ -535,6 +545,18 @@ jobs:
sudo apt update
./scripts/snap_release.sh
- name: Prepare release
id: prepare
if: startsWith(github.ref, 'refs/tags/')
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

snap_pkg_beta:

needs:
Expand Down Expand Up @@ -565,6 +587,14 @@ jobs:
# retry 3 times because of flakey nuget; TODO: remove retry when we migrate to .NET6 (removing LEGACY_FRAMEWORK support)
./scripts/snap_build.sh --native-segwit || ./scripts/snap_build.sh --native-segwit || ./scripts/snap_build.sh --native-segwit || ./scripts/snap_build.sh --native-segwit
- name: Find the snap file's path and name
id: find_snap_beta_file
run: |
FILEPATH=$(ls *.snap)
FILENAME=$(basename $FILEPATH)
echo "file_path=$FILEPATH" >> $GITHUB_OUTPUT
echo "file_name=$FILENAME" >> $GITHUB_OUTPUT
- name: Install snap
# dangerous because it's a local snap (not one from the SnapStore)
run: sudo snap install --dangerous *.snap
Expand Down

0 comments on commit aafd5d0

Please sign in to comment.