-
Notifications
You must be signed in to change notification settings - Fork 0
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 #9 from makamekm/develop
Release fixes
- Loading branch information
Showing
19 changed files
with
740 additions
and
81 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
on: | ||
issue_comment: | ||
types: [created] | ||
name: Automatic Rebase | ||
jobs: | ||
rebase: | ||
name: Rebase | ||
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
with: | ||
fetch-depth: 0 | ||
- name: Automatic Rebase | ||
uses: cirrus-actions/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# https://github.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250 | ||
always_job: | ||
name: Always run job | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Always run | ||
run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped." |
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,19 @@ | ||
name: Automatic Revert | ||
|
||
on: | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
revert-commit: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
if: contains(github.event.comment.body, '/revert') | ||
|
||
steps: | ||
- uses: actions/checkout@v1 | ||
- name: Automatic Revert | ||
uses: srt32/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,12 @@ | ||
name: WIP | ||
on: | ||
pull_request: | ||
types: [ opened, synchronize, reopened, edited ] | ||
|
||
jobs: | ||
wip: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
- uses: wip/[email protected] |
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,21 @@ | ||
name: Node.js Linting | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm install | ||
env: | ||
NODE_ENV: development | ||
- run: npm run lint | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |
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,56 @@ | ||
name: Node.js Develop Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
test_develop: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: 12 | ||
registry-url: https://registry.npmjs.org/ | ||
- run: npm install | ||
env: | ||
NODE_ENV: development | ||
- run: npm run lint | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- name : GITHUB CONTEXT | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
run: echo "$GITHUB_CONTEXT" | ||
- name: get commit message | ||
id: get_commitmsg | ||
run: echo ::set-output name=commitmsg::$(git log --format=%B -n 1 ${{ github.event.after }}) | ||
- name: show commit message | ||
run : echo ${{ steps.get_commitmsg.outputs.commitmsg }} | ||
- name: send a success message | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_TO }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
message: | | ||
Figma React - ${{ github.ref }} | ||
SUCCESSFULLY - test | ||
Triggered by ${{ github.event_name }} event | ||
https://github.com/makamekm/figma-react/actions/runs/${{ github.run_id }} | ||
--- | ||
${{ steps.get_commitmsg.outputs.commitmsg }} | ||
- name: send a fail message | ||
uses: appleboy/telegram-action@master | ||
if: failure() | ||
with: | ||
to: ${{ secrets.TELEGRAM_TO }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
message: | | ||
Figma React - ${{ github.ref }} | ||
FAILED - test | ||
Triggered by ${{ github.event_name }} event | ||
https://github.com/makamekm/figma-react/actions/runs/${{ github.run_id }} | ||
--- | ||
${{ steps.get_commitmsg.outputs.commitmsg }} |
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 |
---|---|---|
|
@@ -22,7 +22,40 @@ jobs: | |
NODE_ENV: development | ||
- run: git config --global user.email "[email protected]" | ||
- run: git config --global user.name "CICD" | ||
- name: Temporarily disable "include administrators" branch protection | ||
uses: makamekm/branch-protection-bot@master | ||
if: always() | ||
with: | ||
access-token: ${{ secrets.GITHUB_TOKEN_CICD }} | ||
enforce_admins: false | ||
- run: npm run release:patch | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN_CICD}} | ||
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | ||
- name: Enable "include administrators" branch protection | ||
uses: makamekm/branch-protection-bot@master | ||
if: always() | ||
with: | ||
access-token: ${{ secrets.GITHUB_TOKEN_CICD }} | ||
enforce_admins: true | ||
- name: send a success message | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_TO }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
message: | | ||
Figma React - ${{ github.ref }} | ||
SUCCESSFULLY - publish | ||
Triggered by ${{ github.event_name }} event | ||
https://github.com/makamekm/figma-react/actions/runs/${{ github.run_id }} | ||
- name: send a fail message | ||
uses: appleboy/telegram-action@master | ||
if: failure() | ||
with: | ||
to: ${{ secrets.TELEGRAM_TO }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
message: | | ||
Figma React - ${{ github.ref }} | ||
FAILED - publish | ||
Triggered by ${{ github.event_name }} event | ||
https://github.com/makamekm/figma-react/actions/runs/${{ github.run_id }} |
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,28 @@ | ||
name: Node.js Public Release Notes | ||
|
||
on: | ||
release: | ||
|
||
jobs: | ||
test_develop: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
- name: Extract tag name | ||
id: tag | ||
uses: actions/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
return context.payload.ref.replace(/\/refs\/tags\//, ''); | ||
- name: send release notes | ||
uses: appleboy/telegram-action@master | ||
with: | ||
to: ${{ secrets.TELEGRAM_PUBLIC_TO }} | ||
token: ${{ secrets.TELEGRAM_TOKEN }} | ||
message: | | ||
New version of Figma React ${{ steps.tag.outputs.result }} has been released | ||
https://github.com/makamekm/figma-react/releases/tag/${{ steps.tag.outputs.result }} | ||
https://www.npmjs.com/package/figma-react |
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
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
Oops, something went wrong.