From dfca448d9d1f04825a549ba0bc7d6b097df295a2 Mon Sep 17 00:00:00 2001 From: Bryan Killian Date: Wed, 25 Mar 2020 18:14:36 -0400 Subject: [PATCH] fix(test release): testing a release --- .github/workflows/push.yml | 50 -------------------------------------- README.md | 10 ++++---- 2 files changed, 5 insertions(+), 55 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index e49838fe..12edb65f 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -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/github-script@0.6.0 - 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/github-script@0.6.0 - 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 "trilom-bot@trailmix.me" - 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 diff --git a/README.md b/README.md index 91edfdeb..64094659 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ jobs: runs-on: ubuntu-latest steps: - id: file_changes - uses: trilom/file-changes-action@v1 + uses: trilom/file-changes-action@v1.2.3 ### full name: changes @@ -79,7 +79,7 @@ jobs: runs-on: ubuntu-latest steps: - id: file_changes - uses: trilom/file-changes-action@v1 + uses: trilom/file-changes-action@v1.2.3 with: # optional target repo githubRepo: trilom/file-changes-action @@ -132,7 +132,7 @@ jobs: runs-on: ubuntu-latest steps: - id: file_changes - uses: trilom/file-changes-action@v1 + uses: trilom/file-changes-action@v1.2.3 - name: test run: | cat $HOME/files.json @@ -155,7 +155,7 @@ jobs: runs-on: ubuntu-latest steps: - id: file_changes - uses: trilom/file-changes-action@v1 + uses: trilom/file-changes-action@v1.2.3 with: output: ',' fileOutput: ',' @@ -186,7 +186,7 @@ jobs: }) return result.data[0].number; - id: file_changes - uses: trilom/file-changes-action@v1 + uses: trilom/file-changes-action@v1.2.3 with: githubToken: ${{ env.BOT_USER_TOKEN }} prNumber: ${{ steps.pr.outputs.results }}