-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
upgrade travis and appveyor to github action #3416
Merged
sschiessl-bcp
merged 2 commits into
bitshares:develop
from
xiangxn:upgrade-github-action
Jan 31, 2022
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Release Bitshares-ui | ||
|
||
on: | ||
push: | ||
tags: | ||
- "*.*.*" | ||
# branches: [testaction] | ||
|
||
jobs: | ||
build: | ||
runs-on: macOS-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [16.13.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: echo "PackageVersion=$(cat package.json | sed 's/,/\n/g' | grep '\"version\":' | sed 's/:/\n/g' | sed '1d' | sed 's/ //g' | sed 's/\"//g' | sed 's/}//g')" >> $GITHUB_ENV | ||
- name: Update package.json | ||
run: | | ||
sed -i -e "s/${{ env.PackageVersion }}/${{ github.ref_name }}/g" package.json | ||
- run: yarn | ||
- name: Build package | ||
run: npm run prepackage | ||
- name: Build dmg | ||
run: ./node_modules/.bin/electron-builder -p never --mac dmg | ||
- name: Build deb | ||
run: ./node_modules/.bin/electron-builder -p never --linux deb | ||
- name: Build exe | ||
run: ./node_modules/.bin/electron-builder -p never --windows | ||
- name: Calc hash | ||
id: calc_hash | ||
run: | | ||
echo "::set-output name=dmghash::${{ hashFiles('build/binaries/**.dmg') }}" | ||
echo "::set-output name=debhash::${{ hashFiles('build/binaries/**.deb') }}" | ||
echo "::set-output name=exehash::${{ hashFiles('build/binaries/**.exe') }}" | ||
- name: Create Body | ||
id: create_body | ||
uses: xiangxn/generate_release_notes@v1 | ||
sschiessl-bcp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
categories: | | ||
[{"title":"New features","labels":["feature","enhancement"]},{"title":"Bug fixes and improvements","labels":["bug","bugfix"]}] | ||
template: | | ||
Release Notes | ||
_________________________________ | ||
|
||
$CHANGES | ||
|
||
Binaries for download | ||
-------- | ||
| Platform | SHA256 Checksum | | ||
|---|---| | ||
|[Microsoft Windows](https://github.com/bitshares/bitshares-ui/releases/download/${{ github.ref_name }}/BitShares_${{ github.ref_name }}.exe)|`${{steps.calc_hash.outputs.exehash}}`| | ||
|[Mac](https://github.com/bitshares/bitshares-ui/releases/download/${{ github.ref_name }}/BitShares_${{ github.ref_name }}.dmg)|`${{steps.calc_hash.outputs.dmghash}}`| | ||
|[Linux](https://github.com/bitshares/bitshares-ui/releases/download/${{ github.ref_name }}/BitShares_${{ github.ref_name }}.deb)|`${{steps.calc_hash.outputs.debhash}}`| | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/[email protected] | ||
sschiessl-bcp marked this conversation as resolved.
Show resolved
Hide resolved
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ github.ref_name }} | ||
release_name: Release ${{ github.ref_name }} | ||
body: ${{ steps.create_body.outputs.body }} | ||
draft: true | ||
- name: Upload dmg | ||
uses: actions/[email protected] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This action (https://github.com/actions/upload-release-asset) is unmaintained too. |
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./build/binaries/BitShares_${{ github.ref_name }}.dmg | ||
asset_name: BitShares_${{ github.ref_name }}.dmg | ||
asset_content_type: application/octet-stream | ||
- name: Upload deb | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./build/binaries/BitShares_${{ github.ref_name }}.deb | ||
asset_name: BitShares_${{ github.ref_name }}.deb | ||
asset_content_type: application/x-deb | ||
- name: Upload exe | ||
uses: actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./build/binaries/BitShares_${{ github.ref_name }}.exe | ||
asset_name: BitShares_${{ github.ref_name }}.exe | ||
asset_content_type: application/octet-stream |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest, these long lines look ugly when viewing Github.com in a web browser.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can be optimized here, such as using jq, but I don't want to use too many external programs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commands can be simply wrapped with the
\
sign and etc. Actually, since you have(
in the command, it supports multiple lines by itself already. E.G.Just my 2 cents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this is not the only long line in the pull request. It's best to wrap them all.