Using gh instead of third party action
This commit is contained in:
54
.github/workflows/publish.yml
vendored
54
.github/workflows/publish.yml
vendored
@@ -14,6 +14,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
PublishBranch: publish/${{github.ref_name }}-${{ github.run_id }}-${{ github.run_number }}
|
||||||
steps:
|
steps:
|
||||||
- name: 'check successful status'
|
- name: 'check successful status'
|
||||||
run: |
|
run: |
|
||||||
@@ -40,8 +42,8 @@ jobs:
|
|||||||
git config --global user.name "Github Actions"
|
git config --global user.name "Github Actions"
|
||||||
- name: 'Checkout new branch'
|
- name: 'Checkout new branch'
|
||||||
run: |
|
run: |
|
||||||
git checkout -b publish/${{ github.ref_name }}-${{ github.run_id }}-${{ github.run_number }}
|
git checkout -b $PublishBranch
|
||||||
git push -u origin publish/${{ github.ref_name }}-${{ github.run_id }}-${{ github.run_number }}
|
git push -u origin $PublishBranch
|
||||||
- name: 'install dependencies'
|
- name: 'install dependencies'
|
||||||
run: |
|
run: |
|
||||||
yarn -D
|
yarn -D
|
||||||
@@ -60,20 +62,36 @@ jobs:
|
|||||||
# GITHUB_TOKEN: ${{ github.token }}
|
# GITHUB_TOKEN: ${{ github.token }}
|
||||||
# PUBLISH_PRERELEASE: ${{ github.event.inputs.prerelease }}
|
# PUBLISH_PRERELEASE: ${{ github.event.inputs.prerelease }}
|
||||||
- name: 'Create PR to merge into ref branch'
|
- name: 'Create PR to merge into ref branch'
|
||||||
uses: peter-evans/create-pull-request@v5
|
run: |
|
||||||
with:
|
gh pr create \
|
||||||
token: ${{ github.token }}
|
-B ${{ github.ref_name }} \
|
||||||
base: ${{ github.ref_name }}
|
-H $PublishBranch \
|
||||||
branch: 'publish/${{ github.ref_name }}-${{ github.run_id }}-${{ github.run_number }}'
|
--title "Published ${{ github.ref_name }}" \
|
||||||
title: 'Published ${{ github.ref_name }}'
|
--body "Syncing CHANGELOG and package version updates from publish action ${{github.run_id}}-${{github.run_number}} into ${{ github.ref_name}} branch" \
|
||||||
body: 'Syncing CHANGELOG and package version updates from publish action ${{github.run_id}}-${{github.run_number}} into ${{ github.ref_name}} branch'
|
--reviewer ${{ github.actor }}
|
||||||
reviewers: ${{ github.actor }}
|
|
||||||
- name: 'Create PR to merge ref branch into main'
|
- name: 'Create PR to merge ref branch into main'
|
||||||
uses: peter-evans/create-pull-request@v5
|
run: |
|
||||||
with:
|
gh pr create \
|
||||||
token: ${{ github.token }}
|
-B main \
|
||||||
base: main
|
-H ${{ github.ref_name }} \
|
||||||
branch: ${{ github.ref_name }}
|
--title "Published ${{ github.ref_name }}" \
|
||||||
title: 'Published ${{ github.ref_name }}'
|
--body "Syncing CHANGELOG and package version updates from publish action ${{github.run_id}}-${{github.run_number}} into main branch" \
|
||||||
body: 'Syncing CHANGELOG and package version updates from published ${{ github.ref_name }} branch into main branch'
|
--reviewer ${{ github.actor }}
|
||||||
reviewers: ${{ github.actor }}
|
|
||||||
|
# uses: peter-evans/create-pull-request@v5
|
||||||
|
# with:
|
||||||
|
# token: ${{ github.token }}
|
||||||
|
# base: ${{ github.ref_name }}
|
||||||
|
# branch: 'publish/${{ github.ref_name }}-${{ github.run_id }}-${{ github.run_number }}'
|
||||||
|
# title: 'Published ${{ github.ref_name }}'
|
||||||
|
# body: 'Syncing CHANGELOG and package version updates from publish action ${{github.run_id}}-${{github.run_number}} into ${{ github.ref_name}} branch'
|
||||||
|
# reviewers: ${{ github.actor }}
|
||||||
|
# - name: 'Create PR to merge ref branch into main'
|
||||||
|
# uses: peter-evans/create-pull-request@v5
|
||||||
|
# with:
|
||||||
|
# token: ${{ github.token }}
|
||||||
|
# base: main
|
||||||
|
# branch: ${{ github.ref_name }}
|
||||||
|
# title: 'Published ${{ github.ref_name }}'
|
||||||
|
# body: 'Syncing CHANGELOG and package version updates from published ${{ github.ref_name }} branch into main branch'
|
||||||
|
# reviewers: ${{ github.actor }}
|
||||||
|
|||||||
Reference in New Issue
Block a user