From b17689121d999ec7a383248b6dcd562273d70c3d Mon Sep 17 00:00:00 2001 From: Anand Chowdhary Date: Sat, 30 May 2020 15:57:33 +0530 Subject: [PATCH] :construction_worker: Add Semantic Release [skip ci] [release] --- .github/workflows/release.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..51e581f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,33 @@ +name: Semantic Release +on: + push: + branches: + - master +jobs: + release: + name: Build, test, and release + runs-on: ubuntu-18.04 + # if: "!contains(github.event.head_commit.message, '[skip ci]')" + if: "contains(github.event.head_commit.message, '[release]')" + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup Deno + uses: denolib/setup-deno@master + with: + deno-version: 1.x + - name: Tests + run: deno test --allow-read + - name: Setup Node.js + uses: actions/setup-node@v1 + with: + node-version: 12.17.0 + - name: Setup package.json + run: echo '{"name":"@denorg/starter","version":"0.0.0","publishConfig":{"access":"public"},"scripts":{"semantic-release":"semantic-release"},"repository":{"type":"git","url":"https://github.com/denorg/starter.git"},"author":"Denorg","license":"MIT","bugs":{"url":"https://github.com/denorg/starter/issues"},"homepage":"https://denorg.github.io/starter/","devDependencies":{"semantic-release":"^17.0.4","semantic-release-gitmoji":"^1.3.3"}}' > package.json + - name: Install dependencies + run: npm install + - name: Release + run: npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}