Skip to content

Commit

Permalink
feat: add beta release
Browse files Browse the repository at this point in the history
  • Loading branch information
DiamondYuan committed Jul 4, 2021
1 parent 03aa19a commit 5b6db24
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/release-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release Web Clipper Beta
on:
push:
tags:
- 'v*'

jobs:
build:
name: Upload Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Dependencies
run: |
npm install
- name: Build project
run: |
npm run release
env:
GITHUB_BRANCH: ${{ github.ref }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Firefox Release Asset
id: upload-firefox-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/web_clipper_firefox.zip
asset_name: web_clipper_firefox.zip
asset_content_type: application/zip
- name: Upload Chrome Release Asset
id: upload-chrome-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./release/web_clipper_chrome.zip
asset_name: web_clipper_chrome.zip
asset_content_type: application/zip
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Upload Release Asset
name: Release Web Clipper

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"cov": "jest --coverage",
"dev": "NODE_ENV=development webpack --config webpack/webpack.dev.js --watch",
"dev:ff": "TARGET_BROWSER=Firefox NODE_ENV=development webpack --config webpack/webpack.dev.js --watch",
"release": "node script/ci.js",
"release": "ts-node script/release.ts",
"release:ff": "bash script/release_ff.sh",
"lint": "eslint --ext .js,.ts,.tsx .",
"lint-staged": "lint-staged",
Expand Down

0 comments on commit 5b6db24

Please sign in to comment.