1
0
mirror of https://github.com/pavlobu/deskreen.git synced 2025-05-27 21:00:08 -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:
tag_name: ${{ github.ref }}
release_name: Deskreen Release ${{ github.ref }}
body: |
⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️
WAIT FOR FILES TO APPEAR HERE ~20 minutes
⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️⌛️
draft: false
draft: true
prerelease: false
release:
@ -112,11 +108,31 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
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
uses: svenstaro/upload-release-action@v2
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
file: ${{ matrix.artifact_name }}
overwrite: true
file_glob: true
tags: 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)
### 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)
![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"
onClick={(e) => {
e.preventDefault();
shell.openExternal(
'https://github.com/pavlobu/deskreen/releases/latest'
);
shell.openExternal('https://deskreen.com');
}}
>
{/* eslint-disable-next-line react/jsx-one-expression-per-line */}

View File

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

View File

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

View File

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

View File

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