diff --git a/.github/workflows/publish-npm-package.yml b/.github/workflows/publish-npm-package.yml index 467b70f..7da694f 100644 --- a/.github/workflows/publish-npm-package.yml +++ b/.github/workflows/publish-npm-package.yml @@ -1,27 +1,33 @@ name: Publish package to npm on: - release: - types: [created] + push: + tags: + - "*" jobs: - publish: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 - - uses: actions/setup-node@v3 - with: - node-version: 18 - registry-url: 'https://npm.pkg.github.com' - scope: '@zerogachis' + - uses: actions/setup-node@v3 + with: + node-version: 18 + registry-url: "https://npm.pkg.github.com" + scope: "@zerogachis" - - name: Update package version - run: npm version --no-git-tag-version ${{ github.ref_name }} + - name: Update package version + run: npm version --no-git-tag-version ${{ github.ref_name }} - - name: Publish - if: startsWith(github.ref, 'refs/tags/') - run: npm publish --access public - env: - NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + - name: Publish to npm + if: startsWith(github.ref, 'refs/tags/') + run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create release + uses: softprops/action-gh-release@v1 + with: + generate_release_notes: True diff --git a/package.json b/package.json index b420d3d..3ae861b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zerogachis/smartway-design-token", - "version": "0.0.2", + "version": "0.0.1", "description": "Smartway design tokens", "main": "tokens.json", "scripts": {