From bd7cc6d3afea03fe11a468b8fdf9c971ab21e052 Mon Sep 17 00:00:00 2001 From: Christopher Gallo Date: Tue, 26 May 2020 14:18:31 -0500 Subject: [PATCH] #1252 added automated snap publisher --- .github/workflows/release.yml | 23 +++++++++++++++++++++++ snap/snapcraft.yaml | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..397168add --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,23 @@ +name: Release + +on: + release: + types: [published] + +jobs: + release: + runs-on: ubuntu-latest + strategy: + matrix: + arch: ['armhf','amd64','arm64','ppc64el','s390x','i386'] + steps: + - name: Install Snapcraft + uses: samuelmeuli/action-snapcraft@v1.1.1 + with: + snapcraft_token: ${{ secrets.snapcraft_token }} + - name: Push to stable + run: | + VERSION=`snapcraft list-revisions slcli --arch ${{ matrix.arch }} | grep "edge\*" | awk '{print $1}'` + echo Publishing $VERSION on ${{ matrix.arch }} + snapcraft release slcli $VERSION stable + diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index b08438c82..474b05f1b 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -1,5 +1,5 @@ name: slcli # check to see if it's available -version: '5.8.1+git' # check versioning +version: 'git' # will be replaced by a `git describe` based version string summary: Python based SoftLayer API Tool. # 79 char long summary description: | A command-line interface is also included and can be used to manage various SoftLayer products and services.