-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9c7f9d
commit bff8b85
Showing
8 changed files
with
212 additions
and
20 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,58 @@ | ||
name: Create Release on QA to Master Merge | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
types: | ||
- closed | ||
|
||
jobs: | ||
create_release: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Read version from package.json | ||
id: get_version | ||
run: echo "VERSION=$(jq -r '.version' package.json)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Read module name | ||
id: get_name | ||
run: echo "MODULE_NAME=$(jq -r '.name' package.json)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Extract commit message | ||
id: extract_commit_message | ||
run: echo "MESSAGE=$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }})" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: Release_${{ steps.get_version.outputs.VERSION }} | ||
release_name: Release ${{ steps.get_version.outputs.VERSION }} | ||
body: ${{ steps.extract_commit_message.outputs.MESSAGE }} | ||
draft: false | ||
prerelease: false | ||
- name: Module Information | ||
uses: fjogeleit/http-request-action@v1 | ||
id: module_info | ||
with: | ||
url: 'https://market-api.rocketbot.com/modules/${{ steps.get_name.outputs.MODULE_NAME }}' | ||
method: 'POST' | ||
|
||
- name: Module ID | ||
id: module_id | ||
run: echo "MODULE_ID=${{ fromJson(steps.module_info.outputs.response).data.id }}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Update module in Market | ||
uses: fjogeleit/http-request-action@v1 | ||
id: update_module | ||
with: | ||
url: 'https://market-api.rocketbot.com/modules/update/${{ steps.module_id.outputs.MODULE_ID }}' | ||
method: 'POST' |
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,58 @@ | ||
name: Create Release on QA to Master Merge | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
types: | ||
- closed | ||
|
||
jobs: | ||
create_release: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Read version from package.json | ||
id: get_version | ||
run: echo "VERSION=$(jq -r '.version' package.json)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Read module name | ||
id: get_name | ||
run: echo "MODULE_NAME=$(jq -r '.name' package.json)" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Extract commit message | ||
id: extract_commit_message | ||
run: echo "MESSAGE=$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }})" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: Release_${{ steps.get_version.outputs.VERSION }} | ||
release_name: Release ${{ steps.get_version.outputs.VERSION }} | ||
body: ${{ steps.extract_commit_message.outputs.MESSAGE }} | ||
draft: false | ||
prerelease: false | ||
- name: Module Information | ||
uses: fjogeleit/http-request-action@v1 | ||
id: module_info | ||
with: | ||
url: 'https://market-api.rocketbot.com/modules/${{ steps.get_name.outputs.MODULE_NAME }}' | ||
method: 'POST' | ||
|
||
- name: Module ID | ||
id: module_id | ||
run: echo "MODULE_ID=${{ fromJson(steps.module_info.outputs.response).data.id }}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Update module in Market | ||
uses: fjogeleit/http-request-action@v1 | ||
id: update_module | ||
with: | ||
url: 'https://market-api.rocketbot.com/modules/update/${{ steps.module_id.outputs.MODULE_ID }}' | ||
method: 'POST' |
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
Binary file not shown.
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