From 9b51d51d3ec3b157c685fa84c02739bb7925a6c8 Mon Sep 17 00:00:00 2001 From: Eduardo Wesley Date: Thu, 10 Mar 2022 23:16:04 -0300 Subject: [PATCH] ci: add publish workflow --- .github/workflows/publish.yml | 40 +++++++++++++++++++++++++++++++++++ README.md | 4 +++- package.json | 9 ++++++-- 3 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..9ce6f1d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,40 @@ +name: Publish + +on: + push: + tags: + - '*' + +jobs: + built-publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set-up node + uses: actions/setup-node@v2 + with: + node-version: 16 + + - name: Install dependencies + run: yarn --frozen-lockfile + + - uses: pocket-apps/action-update-version@v1 + with: + files: ./package.json + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Publishing Library + run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Update Package.json version + run: | + git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --local user.name "github-actions[bot]" + git add . + git commit -m "bump package version" + git push diff --git a/README.md b/README.md index 4c6121e..73435bb 100644 --- a/README.md +++ b/README.md @@ -1 +1,3 @@ -# local-registry \ No newline at end of file +# loctry + +Needs node >=10.0.0 and npm >=7.0.0 diff --git a/package.json b/package.json index e1efd0f..0f0ce77 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,12 @@ "license": "MIT", "type": "module", "keywords": [ - "cli" + "cli", + "local development", + "library testing", + "library development", + "local registry", + "local npm" ], "bin": { "loctry": "./bin/index.mjs" @@ -17,7 +22,7 @@ "yargs": "^17.3.1" }, "engines": { - "node": ">=8.0.0", + "node": ">=10.0.0", "npm": ">=7.0.0", "yarn": ">=1.0.0" }