diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..4ad75b6 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,30 @@ +name: Build and Test +on: + pull_request: + +jobs: + build: + name: Build and Test + runs-on: ubuntu-latest + + steps: + - name: Git Checkout + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + cache: "npm" + registry-url: "https://registry.npmjs.org" + + - name: NPM install + run: npm ci + + - name: Test + run: npm run test + + - name: Compile + run: npm run compile + + - name: Lint + run: npm run lint diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..e956714 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,44 @@ +name: Release +on: + push: + branches: + - main + +jobs: + build: + name: Release + runs-on: ubuntu-latest + + steps: + - name: Git Checkout + uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "22.x" + cache: "npm" + registry-url: "https://registry.npmjs.org" + + - name: NPM install + run: npm ci + + - name: Test + run: npm run test + + - name: Compile + run: npm run compile + + - name: Lint + run: npm run lint + + - name: Configure Git + shell: bash + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Release + run: npm run release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/package.json b/package.json index 90ef8ee..03d1890 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zip24", - "version": "0.1.0", + "version": "0.1.2", "description": "A zip package for the modern age", "type": "module", "author": "Gordon Leigh", @@ -152,7 +152,7 @@ "commitMessage": "chore: release v${version}" }, "npm": { - "publish": true + "publish": false }, "plugins": { "@release-it/conventional-changelog": {