Skip to content

Commit

Permalink
Build: add GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
gordonmleigh committed Oct 4, 2024
1 parent 028f241 commit c81dccb
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -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
44 changes: 44 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -152,7 +152,7 @@
"commitMessage": "chore: release v${version}"
},
"npm": {
"publish": true
"publish": false
},
"plugins": {
"@release-it/conventional-changelog": {
Expand Down

0 comments on commit c81dccb

Please sign in to comment.