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 eae6952
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 1 deletion.
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.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
- name: Release
run: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion 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.1",
"description": "A zip package for the modern age",
"type": "module",
"author": "Gordon Leigh",
Expand Down

0 comments on commit eae6952

Please sign in to comment.