From 14c4b203e1b5fce149d52613552d7a4f6af1f170 Mon Sep 17 00:00:00 2001 From: Suhaib Mujahid Date: Tue, 6 Oct 2020 12:24:46 -0400 Subject: [PATCH] Create release.yml --- .github/workflows/release.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 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 000000000..219af2db4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: Release + +on: + schedule: + - cron: "0 */8 * * *" + +jobs: + lint: + name: lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm ci + - name: release + run: | + git checkout master + git config --global user.name "github-actions" + git config --global user.email "github-actions@users.noreply.github.com" + + npm run build + npm test + [[ `git status --porcelain` ]] || exit + + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + + count=$(cat names.json | wc -l) + git add names.json + # bump the version, commit, and create a tag + npm version patch -f -m "update all-the-package-names to v%s ($count package names)" + + git push origin master --follow-tags + npm publish