-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add create_release workflow and plugin file addition on PR (#58)
- Loading branch information
Showing
3 changed files
with
63 additions
and
22 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,32 @@ | ||
name: Create release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to create' | ||
required: true | ||
|
||
jobs: | ||
create_release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Check .version | ||
run: if [ $(grep ${{ github.event.inputs.version }} .version -c) != 1 ]; then exit 1; fi | ||
|
||
- name: Check Changelog | ||
run: if [ $(grep ${{ github.event.inputs.version }} CHANGELOG.md -c) != 1 ]; then exit 1; fi | ||
|
||
- run: git archive --output=tpay-magento2-basic.zip HEAD | ||
|
||
- name: Create Github release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
tag: ${{ github.event.inputs.version }} | ||
name: "v${{ github.event.inputs.version }}" | ||
generateReleaseNotes: true | ||
artifacts: tpay-magento2-basic.zip |
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,31 @@ | ||
name: Pull request | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/upload-artifact@v4 | ||
id: plugin-upload | ||
with: | ||
name: 'tpay-magento2-basic' | ||
path: './' | ||
|
||
- uses: actions/github-script@v6 | ||
with: | ||
github-token: ${{ secrets.TOKEN }} | ||
script: | | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: 'Tpay Magento2 plugin - ${{ steps.plugin-upload.outputs.artifact-url }}' | ||
}) |
This file was deleted.
Oops, something went wrong.