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 }}