Add Snapcraft release to Core and Designer (#2268)

* Try building snap package

* Custom snap workflow

* Fix names

* Put back node install

* Try moving env

* Add fontconfig lib

* Fix libfontconfig-dev

* Fix git tag priority

* Fix env

* Fix git ref

* Wow, fix ref again

* Remove Node 10 requirement

* Wow I'm silly

* Back to Node 10

* Ditch electron-builder Docker container

* Try apt-get witihout sudo

* Try snapcraft action

* Install snapcraft

* Log into snapcraft

* Install correct version of snapcraft

* Install snapcraft via snap

* Change Designer executable name

* Publish snap to stable

* Try snap store publish overrides

* Fix buildContext reference

* Delete debug release-snap workflow

* Remove electron-builder container

* Remove unnecessary env

* Add back node 10 version check

* Revert non-working snap channel override
This commit is contained in:
Gregory Schier authored and GitHub committed 2020-06-09 17:32:01 -07:00
1 parent 418be4c495
commit ec81568d43
4 files changed
+13 -11

No files matched your search

+4 -4
View File
@@ -48,6 +48,9 @@ jobs:
name: Linux
runs-on: ubuntu-latest
steps:
- run: |
sudo snap install snapcraft --classic
echo "${{ secrets.SNAPCRAFT_LOGIN_FILE }}" > snapcraft.txt && snapcraft login --with snapcraft.txt
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
@@ -56,7 +59,4 @@ jobs:
- run: npm test
- run: npm run app-release
env:
BUILD_TARGETS: AppImage,deb,tar.gz,rpm
# TODO: Figure out Snap deploys
# BUILD_TARGETS: AppImage,Snap,deb,tar.gz,rpm
# SNAPCRAFT_LOGIN_FILE: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
BUILD_TARGETS: AppImage,deb,tar.gz,rpm,snap
+4 -4
View File
@@ -48,6 +48,9 @@ jobs:
name: Linux
runs-on: ubuntu-latest
steps:
- run: |
sudo snap install snapcraft --classic
echo "${{ secrets.SNAPCRAFT_LOGIN_FILE }}" > snapcraft.txt && snapcraft login --with snapcraft.txt
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
@@ -56,7 +59,4 @@ jobs:
- run: npm test
- run: npm run app-release
env:
BUILD_TARGETS: AppImage,deb,tar.gz,rpm
# TODO: Figure out Snap deploys
# BUILD_TARGETS: AppImage,Snap,deb,tar.gz,rpm
# SNAPCRAFT_LOGIN_FILE: ${{ secrets.SNAPCRAFT_LOGIN_FILE }}
BUILD_TARGETS: AppImage,deb,tar.gz,rpm,snap
@@ -1,7 +1,7 @@
{
"version": "2020.2.2",
"name": "insomnia-designer",
"executableName": "designer",
"executableName": "insomnia-designer",
"appId": "com.insomnia.designer",
"userDataFolder": "Insomnia Designer",
"productName": "Insomnia Designer",
+4 -2
View File
@@ -256,23 +256,25 @@ function generatePackageJson(relBasePkg, relOutPkg, forcedVersion) {
// Only release if we're building a tag that ends in a version number
function getBuildContext() {
const {
GIT_TAG,
GITHUB_REF,
GITHUB_SHA,
TRAVIS_TAG,
TRAVIS_COMMIT,
TRAVIS_CURRENT_BRANCH,
GIT_TAG,
} = process.env;
const gitCommit = GITHUB_SHA || TRAVIS_COMMIT;
const gitRef = GITHUB_REF || TRAVIS_TAG || TRAVIS_CURRENT_BRANCH || GIT_TAG || '';
const gitRef = GIT_TAG || GITHUB_REF || TRAVIS_TAG || TRAVIS_CURRENT_BRANCH || '';
const tagMatch = gitRef.match(/(designer|core)@(\d{4}\.\d+\.\d+(-(alpha|beta)\.\d+)?)$/);
const app = tagMatch ? tagMatch[1] : null;
const version = tagMatch ? tagMatch[2] : null;
const channel = tagMatch ? tagMatch[4] : 'stable';
return {
app,
channel,
version,
gitRef,
gitCommit,