-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #81 from grammarly/f-better-release
Improve release
- Loading branch information
Showing
8 changed files
with
35 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
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 |
---|---|---|
@@ -1,45 +1,29 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
release: | ||
# There is no way to run a workflow on push tags on a specific branch. | ||
# The job should be skipped when running for a non-master branch. | ||
if: github.ref == 'refs/heads/master' | ||
name: Release (skip on non-main branch) | ||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Branch name | ||
id: branch_name | ||
run: | | ||
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/} | ||
echo ::set-output name=TARBALL::grammarly-focal-${GITHUB_REF#refs/tags/}.tgz | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- run: yarn install | ||
- run: yarn build | ||
- run: yarn test | ||
- run: yarn package | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload binaries to release | ||
uses: svenstaro/upload-release-action@v2 | ||
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: ./packages/focal/${{ steps.branch_name.outputs.TARBALL }} | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: ./packages/focal/${{ steps.branch_name.outputs.TARBALL }} | ||
asset_name: ${{ steps.branch_name.outputs.TARBALL }} | ||
asset_content_type: application/zip | ||
tag: ${{ github.ref }} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@grammarly/focal", | ||
"version": "0.8.4", | ||
"version": "0.8.5", | ||
"description": "FRP UI with React, observables, immutable data and lenses", | ||
"main": "dist/_cjs/src/index.js", | ||
"module": "dist/_esm5/src/index.js", | ||
|
@@ -28,10 +28,9 @@ | |
"build": "npm run clean && yarn build:cjs && yarn build:es5 && yarn build:es2015 && npm run lint", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"lint": "eslint './src/**/*.ts*' './test/**/*.ts*' && tsc --noemit", | ||
"lint": "tslint --type-check --project tsconfig.json -c tslint.json", | ||
"prepack": "cp ../../README.md ./ && cp ../../LICENSE ./", | ||
"postpack": "rm README.md && rm LICENSE", | ||
"preversion": "if ! [[ $(git rev-parse --abbrev-ref HEAD) == \"master\" ]]; then echo \"Not on the master branch.\" && exit 1; fi" | ||
"postpack": "rm README.md && rm LICENSE" | ||
}, | ||
"author": "Sergey Yavnyi <[email protected]>", | ||
"contributors": [ | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
VER=$1 | ||
|
||
echo "Releasing version $1" | ||
|
||
cd packages/focal && yarn version --new-version $VER --no-git-tag-version && cd ../.. | ||
sed -i '' 's/grammarly\/focal":.*$/grammarly\/focal": "'${VER}'",/g' packages/examples/all/package.json | ||
sed -i '' 's/grammarly\/focal":.*$/grammarly\/focal": "'${VER}'",/g' packages/examples/todomvc/package.json | ||
sed -i '' 's/grammarly\/focal":.*$/grammarly\/focal": "'${VER}'",/g' packages/test/package.json | ||
# yarn | ||
git add . | ||
git commit -m "v$VER" |