Fix v2.3.2 dev problems (#194) #43
Workflow file for this run
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
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
name: Build Release | |
jobs: | |
version_check: | |
name: Version Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set env | |
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV | |
- name: Check | |
run: | | |
set -e | |
grep -qF "\"version\": \"${RELEASE_VERSION}\"" package.json | |
create_release: | |
name: Create release for new version | |
runs-on: ubuntu-latest | |
needs: version_check | |
outputs: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
steps: | |
- 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 }} | |
body: | | |
Release Notes | |
draft: true | |
prerelease: false | |
release-linux-amd64: | |
name: release for linux/amd64 | |
runs-on: ubuntu-latest | |
needs: create_release | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
- id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "16.x" | |
- name: Prepare qshell | |
run: | | |
set -e | |
wget -qLO /tmp/qshell-v2.11.0-linux-amd64.tar.gz https://devtools.qiniu.com/qshell-v2.11.0-linux-amd64.tar.gz | |
tar xf /tmp/qshell-v2.11.0-linux-amd64.tar.gz | |
rm /tmp/qshell-v2.11.0-linux-amd64.tar.gz | |
./qshell account -- "$PUBLISH_ACCESS_KEY" "$PUBLISH_SECRET_KEY" default | |
env: | |
PUBLISH_ACCESS_KEY: ${{ secrets.PUBLISH_ACCESS_KEY }} | |
PUBLISH_SECRET_KEY: ${{ secrets.PUBLISH_SECRET_KEY }} | |
- name: test | |
run: make i test | |
- name: build | |
run: make linux64 | |
- name: Upload Release Asset to Qiniu | |
run: | | |
set -e | |
./qshell rput --resumable-api-v2 --overwrite "$PUBLISH_BUCKET_NAME" "kodobrowser/client/kodo-browser-Linux-x64-${{ steps.vars.outputs.tag }}.zip" "./build/kodo-browser-linux-x64-${{ steps.vars.outputs.tag }}.zip" | |
env: | |
PUBLISH_BUCKET_NAME: ${{ secrets.PUBLISH_BUCKET_NAME }} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: ./build/kodo-browser-linux-x64-${{ steps.vars.outputs.tag }}.zip | |
asset_name: kodo-browser-linux-x64-${{ steps.vars.outputs.tag }}.zip | |
asset_content_type: application/zip | |
release-windows-amd64-x64: | |
name: release for windows/amd64 & windows/x86 | |
runs-on: windows-latest | |
needs: create_release | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
- id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
shell: bash | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "16.x" | |
- name: Prepare qshell | |
run: | | |
set -e | |
curl -s -o ./qshell-v2.11.0-windows-amd64.zip https://devtools.qiniu.com/qshell-v2.11.0-windows-amd64.zip | |
unzip ./qshell-v2.11.0-windows-amd64.zip | |
./qshell account -- "$PUBLISH_ACCESS_KEY" "$PUBLISH_SECRET_KEY" default | |
env: | |
PUBLISH_ACCESS_KEY: ${{ secrets.PUBLISH_ACCESS_KEY }} | |
PUBLISH_SECRET_KEY: ${{ secrets.PUBLISH_SECRET_KEY }} | |
shell: bash | |
- name: test | |
run: make i test | |
- name: build | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
run: make win64 win32 | |
- name: Upload Release Asset to Qiniu | |
run: | | |
set -e | |
./qshell.exe rput --resumable-api-v2 --overwrite "$PUBLISH_BUCKET_NAME" "kodobrowser/client/kodo-browser-Windows-x64-${{ steps.vars.outputs.tag }}.zip" "./build/kodo-browser-win32-x64-${{ steps.vars.outputs.tag }}.zip" | |
./qshell.exe rput --resumable-api-v2 --overwrite "$PUBLISH_BUCKET_NAME" "kodobrowser/client/kodo-browser-Windows-x86-${{ steps.vars.outputs.tag }}.zip" "./build/kodo-browser-win32-x86-${{ steps.vars.outputs.tag }}.zip" | |
shell: bash | |
env: | |
PUBLISH_BUCKET_NAME: ${{ secrets.PUBLISH_BUCKET_NAME }} | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: ./build/kodo-browser-win32-x64-${{ steps.vars.outputs.tag }}.zip | |
asset_name: kodo-browser-win32-x64-${{ steps.vars.outputs.tag }}.zip | |
asset_content_type: application/zip | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: ./build/kodo-browser-win32-x86-${{ steps.vars.outputs.tag }}.zip | |
asset_name: kodo-browser-win32-x86-${{ steps.vars.outputs.tag }}.zip | |
asset_content_type: application/zip | |
release-darwin-amd64: | |
name: release for darwin/amd64 | |
runs-on: macos-latest | |
needs: create_release | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.ref }} | |
- id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: "16.x" | |
- name: Prepare qshell | |
run: | | |
set -e | |
wget -qLO /tmp/qshell-v2.11.0-linux-amd64.tar.gz https://devtools.qiniu.com/qshell-v2.11.0-darwin-amd64.tar.gz | |
tar xf /tmp/qshell-v2.11.0-linux-amd64.tar.gz | |
./qshell account -- "$PUBLISH_ACCESS_KEY" "$PUBLISH_SECRET_KEY" default | |
env: | |
PUBLISH_ACCESS_KEY: ${{ secrets.PUBLISH_ACCESS_KEY }} | |
PUBLISH_SECRET_KEY: ${{ secrets.PUBLISH_SECRET_KEY }} | |
- name: test | |
run: make i test | |
- name: build | |
env: | |
NODE_OPTIONS: "--max_old_space_size=4096" | |
run: make mac | |
- name: Upload Release Asset to Qiniu | |
run: | | |
set -e | |
./qshell rput --resumable-api-v2 --overwrite "$PUBLISH_BUCKET_NAME" "kodobrowser/client/kodo-browser-Mac OS-${{ steps.vars.outputs.tag }}.zip" "./build/kodo-browser-darwin-x64-${{ steps.vars.outputs.tag }}.zip" | |
env: | |
PUBLISH_BUCKET_NAME: ${{ secrets.PUBLISH_BUCKET_NAME }} | |
- name: Upload Release Asset | |
id: upload-release-asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.create_release.outputs.upload_url }} | |
asset_path: ./build/kodo-browser-darwin-x64-${{ steps.vars.outputs.tag }}.zip | |
asset_name: kodo-browser-darwin-x64-${{ steps.vars.outputs.tag }}.zip | |
asset_content_type: application/zip |