1
0
mirror of https://github.com/pavlobu/deskreen.git synced 2025-06-03 00:00:24 -07:00

better release mechanism

This commit is contained in:
Pavlo Buidenkov 2021-01-29 13:01:48 +02:00
parent 3e8ddf324b
commit 527a72208a
7 changed files with 38 additions and 29 deletions

View File

@ -20,11 +20,7 @@ jobs:
with: with:
tag_name: ${{ github.ref }} tag_name: ${{ github.ref }}
release_name: Deskreen Release ${{ github.ref }} release_name: Deskreen Release ${{ github.ref }}
body: | draft: true
⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️
WAIT FOR FILES TO APPEAR HERE ~20 minutes
⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️
draft: false
prerelease: false prerelease: false
release: release:
@ -112,11 +108,31 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: yarn package-ci run: yarn package-ci
# - name: Upload binaries to release
# uses: svenstaro/upload-release-action@v2
# with:
# repo_token: ${{ secrets.GITHUB_TOKEN }}
# tag: ${{ github.ref }}
# file: ${{ matrix.artifact_name }}
# overwrite: true
# file_glob: true
- name: Upload binaries to release - name: Upload binaries to release
uses: svenstaro/upload-release-action@v2 uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ${{ matrix.artifact_name }} file: ${{ matrix.artifact_name }}
overwrite: true tags: true
file_glob: true draft: true
# - name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ./my-artifact.zip
# asset_name: my-artifact.zip
# asset_content_type: application/zip

View File

@ -2,7 +2,7 @@
![Deskreen Logo](https://raw.githubusercontent.com/pavlobu/deskreen/master/resources/icon.png) ![Deskreen Logo](https://raw.githubusercontent.com/pavlobu/deskreen/master/resources/icon.png)
### Website: https://www.deskreen.com ### Website: https://deskreen.com
![release all os -- no code signing](https://github.com/pavlobu/deskreen/workflows/release%20all%20os%20--%20no%20code%20signing/badge.svg) ![release all os -- no code signing](https://github.com/pavlobu/deskreen/workflows/release%20all%20os%20--%20no%20code%20signing/badge.svg)
![build-and-test](https://github.com/pavlobu/deskreen/workflows/build%20and%20test/badge.svg) ![build-and-test](https://github.com/pavlobu/deskreen/workflows/build%20and%20test/badge.svg)

View File

@ -376,9 +376,7 @@ export default function SettingsOverlay(props: SettingsOverlayProps) {
id="new-version-header" id="new-version-header"
onClick={(e) => { onClick={(e) => {
e.preventDefault(); e.preventDefault();
shell.openExternal( shell.openExternal('https://deskreen.com');
'https://github.com/pavlobu/deskreen/releases/latest'
);
}} }}
> >
{/* eslint-disable-next-line react/jsx-one-expression-per-line */} {/* eslint-disable-next-line react/jsx-one-expression-per-line */}

View File

@ -259,7 +259,7 @@ exports[`should match exact snapshot 1`] = `
isEntireScreenSelected={false} isEntireScreenSelected={false}
> >
<div <div
className="makeStyles-root-4 makeStyles-active-5 active-stepper-pulse-icon" className="makeStyles-root-4 makeStyles-active-5"
> >
<Blueprint3.Icon <Blueprint3.Icon
color="#fff" color="#fff"
@ -531,7 +531,7 @@ exports[`should match exact snapshot 1`] = `
isEntireScreenSelected={false} isEntireScreenSelected={false}
> >
<div <div
className="makeStyles-root-4 " className="makeStyles-root-4"
> >
<Blueprint3.Icon <Blueprint3.Icon
color="#5C7080" color="#5C7080"
@ -803,7 +803,7 @@ exports[`should match exact snapshot 1`] = `
isEntireScreenSelected={false} isEntireScreenSelected={false}
> >
<div <div
className="makeStyles-root-4 " className="makeStyles-root-4"
> >
<Blueprint3.Icon <Blueprint3.Icon
color="#5C7080" color="#5C7080"

View File

@ -1181,7 +1181,7 @@ exports[`should match exact snapshot 1`] = `
isEntireScreenSelected={false} isEntireScreenSelected={false}
> >
<div <div
className="makeStyles-root-106 makeStyles-active-107 active-stepper-pulse-icon" className="makeStyles-root-106 makeStyles-active-107"
> >
<Blueprint3.Icon <Blueprint3.Icon
color="#fff" color="#fff"
@ -1453,7 +1453,7 @@ exports[`should match exact snapshot 1`] = `
isEntireScreenSelected={false} isEntireScreenSelected={false}
> >
<div <div
className="makeStyles-root-106 " className="makeStyles-root-106"
> >
<Blueprint3.Icon <Blueprint3.Icon
color="#5C7080" color="#5C7080"
@ -1725,7 +1725,7 @@ exports[`should match exact snapshot 1`] = `
isEntireScreenSelected={false} isEntireScreenSelected={false}
> >
<div <div
className="makeStyles-root-106 " className="makeStyles-root-106"
> >
<Blueprint3.Icon <Blueprint3.Icon
color="#5C7080" color="#5C7080"

View File

@ -69,9 +69,7 @@ export default class DeskreenApp {
notificationInstance.show(); notificationInstance.show();
notificationInstance.on('click', (event) => { notificationInstance.on('click', (event) => {
event.preventDefault(); // prevent the browser from focusing the Notification's tab event.preventDefault(); // prevent the browser from focusing the Notification's tab
shell.openExternal( shell.openExternal('https://deskreen.com');
'https://github.com/pavlobu/deskreen/releases/latest'
);
}); });
}; };

View File

@ -2,7 +2,7 @@
import axios from 'axios'; import axios from 'axios';
const githubApiRepoTagsUrl = const githubApiRepoTagsUrl =
'https://api.github.com/repos/pavlobu/deskreen/tags'; 'https://api.github.com/repos/pavlobu/deskreen/releases/latest';
export default async function getNewVersionTag() { export default async function getNewVersionTag() {
let latestVersionTag = ''; let latestVersionTag = '';
@ -13,12 +13,9 @@ export default async function getNewVersionTag() {
headers: { 'User-Agent': 'node.js' }, headers: { 'User-Agent': 'node.js' },
}); });
const foundTag = response.data.find((tagData: any) => { const tagName = response.data.tag_name;
return (tagData.name as string).startsWith('v');
});
latestVersionTag = foundTag ? foundTag.name : ''; latestVersionTag = tagName.slice(1);
latestVersionTag = latestVersionTag.slice(1);
return latestVersionTag; return latestVersionTag;
} }