generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(test release): testing a release
- Loading branch information
Showing
2 changed files
with
5 additions
and
55 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 |
---|---|---|
|
@@ -5,56 +5,6 @@ on: | |
branches: [master, next, alpha, beta] | ||
tags-ignore: ['**'] | ||
jobs: | ||
post-release: | ||
name: Perform post release tasks | ||
runs-on: ubuntu-latest | ||
if: github.actor == 'semantic-release-bot' && contains(github.event.head_commit.message, 'chore(release):') | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.TRILOM_BOT_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
steps: | ||
- name: get original PR number | ||
uses: actions/[email protected] | ||
id: pr | ||
with: | ||
github-token: ${{env.GITHUB_TOKEN}} | ||
result-encoding: string | ||
script: | | ||
const result = await github.repos.listPullRequestsAssociatedWithCommit({ | ||
owner: context.payload.repository.owner.name, | ||
repo: context.payload.repository.name, | ||
commit_sha: context.payload.head_commit.id | ||
}) | ||
if (result.data.length >= 1) { | ||
return result.data[0].number | ||
} else return 87 | ||
- name: get original PR user | ||
uses: actions/[email protected] | ||
id: label | ||
if: steps.pr.outputs.result != 0 | ||
with: | ||
github-token: ${{env.GITHUB_TOKEN}} | ||
result-encoding: string | ||
script: | | ||
const result = await github.pulls.get({ | ||
owner: context.payload.repository.owner.name, | ||
repo: context.payload.repository.name, | ||
pull_number: ${{ steps.pr.outputs.result }} | ||
}) | ||
let rLabel = 'no-label' | ||
result.data.labels.filter(label => { | ||
(label.name.includes('releases/v')) ? rLabel = label.name.replace('releases/v','') : false | ||
}) | ||
return rLabel; | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- run: | | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "trilom-bot" | ||
git add --all | ||
git diff-index --quiet HEAD || git commit -m "${{ github.event.head_commit.message }}" -a | ||
git push -f https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/${{ steps.label.outputs.result }} | ||
# semantic release an auto-merged branch to github package repo, npm, github actions | ||
release: | ||
name: Release to NPM, Github, Github Actions Marketplace | ||
|
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