Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): add manual release workflow
- Loading branch information
Showing
4 changed files
with
80 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ on: | |
push: | ||
branches: [ main ] | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
node_version: 16.x | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Publish - Package release and publish | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
tags: | ||
# Ignore release candidates | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
workflow_dispatch: | ||
|
||
env: | ||
node_version: 16.x | ||
|
||
jobs: | ||
release: | ||
name: Publish | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout branch ${{ github.ref }} | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js ${{ env.node_version }} | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
cache: 'yarn' | ||
|
||
- name: Clean install dependencies | ||
run: yarn install | ||
|
||
- name: Build application | ||
run: yarn build | ||
|
||
- name: Zip build folder | ||
run: | | ||
# Zipping build folder for artifact upload | ||
cd build; | ||
zip -r synology-download.zip * | ||
# Check zip created | ||
echo "Zip created in 'build/'" | ||
ls -l synology-download.zip | ||
cd .. | ||
- name: Generate Release changelog | ||
run: yarn changelog | ||
|
||
- name: Push Release to github | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
body_path: RELEASE.md | ||
files: build/synology-download.zip | ||
|
||
- name: Publish to Chrome webstore | ||
env: | ||
CHROME_WEB_STORE_EXTENSION_ID: ebbdkledlkjpgbbmmopgbnnjmklnkcef | ||
CHROME_WEB_STORE_CLIENT_ID: ${{ secrets.CHROME_WEB_STORE_CLIENT_ID }} | ||
CHROME_WEB_STORE_CLIENT_SECRET: ${{ secrets.CHROME_WEB_STORE_CLIENT_SECRET }} | ||
CHROME_WEB_STORE_REFRESH_TOKEN: ${{ secrets.CHROME_WEB_STORE_REFRESH_TOKEN }} | ||
run: | | ||
# Uploadind zip to web store | ||
yarn dlx -q chrome-webstore-upload-cli upload --source build/synology-download.zip --extension-id "$CHROME_WEB_STORE_EXTENSION_ID" --client-id "$CHROME_WEB_STORE_CLIENT_ID" --client-secret "$CHROME_WEB_STORE_CLIENT_SECRET" --refresh-token "$CHROME_WEB_STORE_REFRESH_TOKEN" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters