Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build

on:
push:
branches:
- "main"
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches:
- "main"

jobs:
build:
name: Build & Publish
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v3.2.1

- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v3.2.1
with:
useConfigFile: true
configFilePath: GitVersion.yml

- name: Install NPM Packages
shell: pwsh
run: npm i

- name: Build Project
shell: pwsh
run: npm run build

- name: Publish to NPM
if: startsWith(github.ref, 'refs/tags/')
shell: pwsh
run: |
npm version ${{ steps.gitversion.outputs.fullSemVer }} --no-git-tag-version
npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
28 changes: 28 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
mode: ContinuousDelivery
branches:
main:
label: beta
increment: Minor
regex: ^main$
is-main-branch: true
source-branches: []
pull-request:
label: alpha
increment: Minor
feature:
label: alpha
increment: Minor
regex: ^feature/?
is-main-branch: false
source-branches:
- main
hotfix:
label: alpha
increment: Patch
regex: ^(?:hot)?fix/?
is-main-branch: false
source-branches:
- main
ignore:
sha: []
merge-message-formats: {}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Flexsaber
[![Build](https://github.com/mikeleg/flexsaber/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/mikeleg/flexsaber/actions?query=workflow%3A%22Build%22)

![Flexsaber Logo](./logo.png)

Expand Down