From d360577209a9a3ea7cff7900d737449d2c5e5c27 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Sat, 5 Sep 2020 18:06:54 -0700 Subject: [PATCH] build: use release-please action (#1736) --- .github/publish.yml | 2 -- .github/workflows/ci.yaml | 1 + .github/workflows/release-please.yml | 32 +++++++++++++++++++++++++++- 3 files changed, 32 insertions(+), 3 deletions(-) delete mode 100644 .github/publish.yml diff --git a/.github/publish.yml b/.github/publish.yml deleted file mode 100644 index e933b632b..000000000 --- a/.github/publish.yml +++ /dev/null @@ -1,2 +0,0 @@ -project: oss-automation -secretId: node-tooling diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d13e37711..19114b433 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,6 +3,7 @@ on: branches: - master pull_request: + types: [ assigned, opened, synchronize, reopened, labeled ] name: ci jobs: test: diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 33b02a1bd..bcb36e210 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -7,8 +7,38 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - uses: bcoe/release-please-action@v1.0.1 + - uses: bcoe/release-please-action@v2.1.1 + id: release with: token: ${{ secrets.GITHUB_TOKEN }} release-type: node package-name: yargs + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 14 + - run: npm install + - run: npm run compile + - name: push Deno release + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + git remote add gh-token "https://${{ secrets.GITHUB_TOKEN}}@github.com/yargs/yargs.git" + git checkout -b deno + git add -f build + git commit -a -m 'chore: ${{ steps.release.outputs.tag_name }} release' + git push origin +deno + git tag -a ${{ steps.release.outputs.tag_name }}-deno -m 'chore: ${{ steps.release.outputs.tag_name }} release' + git push origin ${{ steps.release.outputs.tag_name }}-deno + if: ${{ steps.release.outputs.release_created }} + - uses: actions/setup-node@v1 + with: + node-version: 14 + registry-url: 'https://external-dot-oss-automation.appspot.com/' + if: ${{ steps.release.outputs.release_created }} + - run: npm install + if: ${{ steps.release.outputs.release_created }} + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + if: ${{ steps.release.outputs.release_created }} \ No newline at end of file