From 0e16207e9564a8c4ec1cb5770348c18d3d194a9f Mon Sep 17 00:00:00 2001 From: Guilherme Minozzi Date: Wed, 20 Mar 2024 12:09:44 -0300 Subject: [PATCH 1/3] feat: add publish workflow --- .github/workflows/publish.yml | 70 +++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) 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..052a979 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,70 @@ +name: Publish Configurations on Release + +on: + pull_request: + branches: + - main + +permissions: + contents: write + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 18.x + registry-url: "https://registry.npmjs.org" + + - name: Install dependencies + run: npm install + + - uses: actions/cache@v3 + name: Setup npm cache + with: + path: ~/.npm + key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-modules- + + - name: Setup Git + run: | + git config user.email "actions@github.com" + git config user.name "GitHub Actions" + + - name: Generate tag and release body + run: | + npm run release + + - name: Publish tag + id: publish_tag + run: | + git push --follow-tags origin develop + echo ::set-output name=tag::$(git describe HEAD --abbrev=0) + + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + release_name: Release ${{ steps.publish_tag.outputs.tag }} + tag_name: ${{ steps.publish_tag.outputs.tag }} + body_path: CHANGELOG.md + draft: false + prerelease: false + + - name: Login to npm + run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc + + - name: Publish Configuration to NPM + run: npm publish --verbose --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} From 8f27cf734be7da10bc4965e82149ccd920d411c5 Mon Sep 17 00:00:00 2001 From: Guilherme Minozzi Date: Wed, 20 Mar 2024 14:48:37 -0300 Subject: [PATCH 2/3] fix: publish workflow --- .github/workflows/publish.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 052a979..65f53dc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,7 +1,7 @@ name: Publish Configurations on Release on: - pull_request: + push: branches: - main @@ -35,19 +35,9 @@ jobs: restore-keys: | ${{ runner.os }}-node-modules- - - name: Setup Git + - name: Tag + id: tag run: | - git config user.email "actions@github.com" - git config user.name "GitHub Actions" - - - name: Generate tag and release body - run: | - npm run release - - - name: Publish tag - id: publish_tag - run: | - git push --follow-tags origin develop echo ::set-output name=tag::$(git describe HEAD --abbrev=0) - name: Create Release @@ -55,8 +45,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - release_name: Release ${{ steps.publish_tag.outputs.tag }} - tag_name: ${{ steps.publish_tag.outputs.tag }} + release_name: Release ${{ steps.tag.outputs.tag }} + tag_name: ${{ steps.tag.outputs.tag }} body_path: CHANGELOG.md draft: false prerelease: false From c739000f5baf92eaa8d5231e06a816afeebf5dc4 Mon Sep 17 00:00:00 2001 From: Guilherme Minozzi Date: Wed, 20 Mar 2024 14:57:19 -0300 Subject: [PATCH 3/3] chore(release): 1.1.0 --- CHANGELOG.md | 24 ++++++++++++++++++++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..d96ef8c --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,24 @@ +# Changelog + +All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. + +## 1.1.0 (2024-03-20) + + +### Features + +* add editor config ([7372680](https://github.com/natahouse/nata-lint/commit/7372680b2a94f09bd60507e09b2404df31152100)) +* add npm ignore ([5388d95](https://github.com/natahouse/nata-lint/commit/5388d95caedfc80262d5dbf1e0e79cc54d491d34)) +* add nvmrc ([89be2e8](https://github.com/natahouse/nata-lint/commit/89be2e852f5aa0179bceae99b928c0bc82b40418)) +* add publish workflow ([0e16207](https://github.com/natahouse/nata-lint/commit/0e16207e9564a8c4ec1cb5770348c18d3d194a9f)) +* add publish workflow ([9fa76bc](https://github.com/natahouse/nata-lint/commit/9fa76bc961d6b47e439a76b1cd754f85a2422300)) +* add versionrc ([7b4c5d8](https://github.com/natahouse/nata-lint/commit/7b4c5d867c516f38a10dea4752b67ab2746fcdf9)) + + +### Bug Fixes + +* add new empty line on the eol ([6c20b7e](https://github.com/natahouse/nata-lint/commit/6c20b7ed29aae22704e8fefe32ff4e0b441aa246)) +* **docs:** english improvements and minor changes ([a34a664](https://github.com/natahouse/nata-lint/commit/a34a66404abc7cddfdd5c8f7a17a7a829b8b5571)) +* package.json configurations to extend correctly eslint configs ([bbcd92b](https://github.com/natahouse/nata-lint/commit/bbcd92b4a992c5bc53c15a735990b39bc3d5b389)) +* packageManager version ([b3c2022](https://github.com/natahouse/nata-lint/commit/b3c20225b328d45d3f93639674cfe174d252629e)) +* publish workflow ([8f27cf7](https://github.com/natahouse/nata-lint/commit/8f27cf734be7da10bc4965e82149ccd920d411c5)) diff --git a/package-lock.json b/package-lock.json index d26c032..0bb4bfb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@natahouse/eslint-config", - "version": "1.0.1", + "version": "1.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@natahouse/eslint-config", - "version": "1.0.1", + "version": "1.1.0", "license": "MIT", "dependencies": { "@typescript-eslint/eslint-plugin": "^7.1.0", diff --git a/package.json b/package.json index 5d9cf24..f7a19e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@natahouse/eslint-config", - "version": "1.0.1", + "version": "1.1.0", "private": false, "description": "ESLint configuration used by nata.house", "main": "index.js",