Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
22a563b
Add workflow
niranjanshk27 Jul 12, 2021
716acd8
1.0.1
bhoos-ops Jul 12, 2021
0fb274c
downgrade version
niranjanshk27 Jul 12, 2021
388e580
1.0.1
niranjanshk27 Jul 13, 2021
46bdbeb
1.0.2
niranjanshk27 Jul 13, 2021
c45f9ae
match version to origin master
niranjanshk27 Jul 13, 2021
3e87600
Use personal token for publishing to latest tag
niranjanshk27 Jul 14, 2021
26f0a12
Add release draft
niranjanshk27 Jul 15, 2021
53dc7aa
Merge branch 'master' of github.com:bhoos/react-native-kit
niranjanshk27 Jul 20, 2021
09d0a91
Set the repository
niranjanshk27 Jul 20, 2021
4b88098
Use of github token and fix typo
niranjanshk27 Jul 20, 2021
ab47836
Merge branch 'master' of github.com:bhoos/react-native-kit
niranjanshk27 Jul 20, 2021
32bb2f2
Remove netrc file
niranjanshk27 Jul 20, 2021
20e4477
release note config
niranjanshk27 Aug 24, 2021
d97dfda
update workflow and release action
niranjanshk27 Aug 24, 2021
2719c9f
v1.0.3
bhoos-ops Aug 24, 2021
965dfe3
downgrade version
niranjanshk27 Aug 24, 2021
3fa1d06
Merge branch 'master' of github.com:bhoos/react-native-kit
niranjanshk27 Aug 24, 2021
72af016
Merge branch 'master' of github.com:bhoos/react-native-kit
niranjanshk27 Sep 27, 2021
39d3682
fix typo
niranjanshk27 Sep 27, 2021
f26dbb3
fix release log tempalte
niranjanshk27 Sep 27, 2021
6b8a4a6
delete log config
niranjanshk27 Jan 19, 2022
7cc8a9d
add pr check
niranjanshk27 Jan 19, 2022
3297267
rename file and update workflow
niranjanshk27 Jan 19, 2022
cd75758
Bump Version
niranjanshk27 Jan 19, 2022
4ad42be
remove scripts
niranjanshk27 Sep 9, 2022
acc1cf5
update flow
niranjanshk27 Sep 9, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/checkPR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow check current version and the latest tag version
# if current version and latest version is same than PR check fail
# if current version and latest version is not same than PR check pass

name: PR Check

on:
pull_request:
branches:
- master

jobs:
pr-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Get current version and tag
run: |
version="$(node -p "require('./package.json').version")"
tag="$(git describe --tag --abbrev=0 | cut -c 2-)"
if [ "$version" == "$tag" ]; then
echo "Current version and the recent tag version is same. Please update the version in package.json file."
exit 1;
else
echo "Current verions:$version Tag:$tag \nThis PR is ready to merge."
exit 0;
fi
35 changes: 15 additions & 20 deletions .github/workflows/master.yml → .github/workflows/onComment.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
# When any change is pushed on master, it triggers a beta
# version release with the @next tag
#
# When a tag is published, it triggers the release flow,
# which takes the version which is released and converts
# it into the @latest tag
name: Process master branch updates
# When issue is created with title "Deploy" and anybody
# comment "/deploy" in comment this workflow is triggered.
# This workflow publish the package in @next tag.

name: Process master branch for @next tag

on:
push:
branches:
- master
issue_comment:
types: [created]

jobs:
push-to-next:
if: ${{ github.event.issue.title == 'Deploy' && github.event.comment.body == '/deploy' && github.event.issue.state == 'open' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -26,27 +24,24 @@ jobs:
node-version: '14.x'
registry-url: 'https://npm.pkg.github.com'
scope: '@bhoos'

- name: Install Dependencies and publish packages
run: |
yarn
yarn version --patch
yarn publish . --tag next
version=$(node -p "require('./package.json').version")
echo "RELEASE_VERSION=v${version}" >> $GITHUB_ENV
echo "ISSUE_NUMBER=${{github.event.issue.number}}" >> $GITHUB_ENV
git push && git push --tags
yarn clean && yarn build
yarn publish . --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v1
with:
configuration: "workflow_config/config.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Create Release for moving to production
uses: ncipollo/release-action@v1
with:
tag: ${{ env.RELEASE_VERSION }}
name: Release ${{ env.RELEASE_VERSION }}
name: Release ${{ env.RELEASE_VERSION }} (#${{ env.ISSUE_NUMBER }})
commit: master
body: ${{steps.github_release.outputs.changelog}}
draft: true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Promote staging version to production (latest)
name: Promote to Production
name: Promote to Production (@latest tag)

on:
release:
type: [published]
types: [published]

jobs:
production-release:
Expand All @@ -18,10 +18,23 @@ jobs:

- name: Publish release
run: |
echo "ISSUE_NUMBER=$(echo $NUMBER | awk -F'[\#\)]' '{print $2}')" >> $GITHUB_ENV
pkg=$(node -p "require('./package.json').name")
version=$(node -p "require('./package.json').version")
echo "Releasing ${pkg}@${version} to latest"
# The following command doesn't work with `yarn tag` (2021-Jan-06)
npm dist-tag add ${pkg}@${version} latest
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{github.event.release.name}}
# Close issue
- name: Close Issue
uses: peter-evans/close-issue@v1
with:
issue-number: ${{ env.ISSUE_NUMBER }}
comment: This issue is tested and realeased. Auto-closing issue.
# Deletes any release marked as a draft
- name: Delete drafts
uses: hugo19941994/delete-draft-releases@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bhoos/react-native-kit",
"version": "1.0.7",
"version": "1.0.8",
"description": "Bhoos React Native Library",
"main": "dist/index.js",
"module": "es6/index.js",
Expand All @@ -9,9 +9,7 @@
"clean": "rimraf dist && rimraf es6",
"build:cjs": "tsc",
"build:es6": "mkdir -p es6 && echo '{\"type\":\"module\"}' > es6/package.json && tsc --module es6 --outDir es6",
"build": "yarn build:cjs && yarn build:es6",
"prepublishOnly": "yarn clean && yarn build",
"postversion": "git push && git push --tags"
"build": "yarn build:cjs && yarn build:es6"
},
"files": [
"dist",
Expand Down
32 changes: 0 additions & 32 deletions workflow_config/config.json

This file was deleted.