From 60258953db09694daa9c2e49d39611774a251b16 Mon Sep 17 00:00:00 2001 From: Jonathan Ginsburg Date: Wed, 16 Mar 2022 14:18:11 -0600 Subject: [PATCH] ci: add the "Release" GitHub Actions workflow --- .github/workflows/release.yml | 27 +++++++++++++++++++++++++++ package.json | 5 +++-- 2 files changed, 30 insertions(+), 2 deletions(-) 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..c8d3641 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Release + +on: + push: + branches: + - master + +jobs: + main: + name: Test and Release + runs-on: ubuntu-latest + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + GITHUB_TOKEN: ${{ secrets.KARMARUNNERBOT_GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v3 + with: + token: ${{ env.GITHUB_TOKEN }} + fetch-depth: 0 + - uses: browser-actions/setup-firefox@latest + - uses: actions/setup-node@v3 + with: + node-version: 12 + cache: npm + - run: npm ci + - run: npm run test + - run: npm run release diff --git a/package.json b/package.json index 8d1bba9..9b30e42 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "lib/*.js" ], "scripts": { - "test": "jasmine && grunt" + "test": "jasmine && grunt", + "release": "grunt release" }, "repository": { "type": "git", @@ -98,4 +99,4 @@ "Matthew Hill ", "Milan Lempera " ] -} +} \ No newline at end of file