diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index a6c2ee3..1ff6747 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -2,32 +2,29 @@ on: push: branches: - main -name: publish +name: Build, Test and maybe Publish permissions: contents: write jobs: release: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v2 - - name: write to .npmrc - run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc - - name: install + - uses: actions/checkout@v2 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: 20.x + - name: Install Dependencies run: npm install --legacy-peer-deps - - name: automated version bump + - name: "Automated Version Bump" uses: "phips28/gh-action-bump-version@master" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: target-branch: main commit-message: "CI: bumps version to {{version}} [skip ci]" - - name: build + - name: Build run: npm run build - - name: publish - run: cd dist && npm publish --access=public - - name: discord notification - uses: sarisia/actions-status-discord@v1 - if: always() - with: - webhook: ${{ secrets.DISCORD_WEBHOOK }} \ No newline at end of file + - name: Write out .npmrc + run: echo "//registry.npmjs.org/:_authToken=${{secrets.NPM_TOKEN}}" > ~/.npmrc + - run: npm publish --access=public diff --git a/package.json b/package.json index 65e250a..a1d3ed7 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,7 @@ }, "scripts": { "check": "svelte-check --tsconfig ./tsconfig.json", - "prepare": "svelte-check --tsconfig ./tsconfig.json", - "build": "rimraf dist && svelte-package && cpx package.json dist && cd dist && npm version from-git" + "build": "rimraf dist && svelte-package && cpx package.json dist" }, "devDependencies": { "@sveltejs/package": "^2.3.7",