-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fix tests and add semantic release.
- Loading branch information
1 parent
678cb6e
commit 8f191c6
Showing
5 changed files
with
145 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
# pull_request: | ||
# branches: | ||
# - master | ||
jobs: | ||
unit_tests: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
haxe: [4.0.5] | ||
fail-fast: true | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: krdlab/setup-haxe@v1 | ||
with: | ||
haxe-version: ${{ matrix.haxe }} | ||
- run: haxe -version | ||
- run: haxelib install test.hxml --always | ||
- name: Compile test code | ||
run: haxelib run munit t | ||
semantic_release: | ||
needs: unit_tests | ||
name: semantic_release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Set up Node.js | ||
uses: actions/setup-node@v1 | ||
- name: Setup haxe | ||
uses: krdlab/setup-haxe@v1 | ||
- name: Run semantic release | ||
env: # Or as an environment variable | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
HAXELIB_PASS: ${{secrets.HAXELIB_PASS}} | ||
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | ||
run: | | ||
npm ci | ||
npx semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"branches": [ | ||
"master" | ||
], | ||
"tagFormat": "${version}", | ||
"plugins": [ | ||
[ | ||
"@semantic-release/commit-analyzer", | ||
{ | ||
"preset": "angular", | ||
"parserOpts": { | ||
"noteKeywords": [ | ||
"BREAKING CHANGE", | ||
"BREAKING CHANGES", | ||
"BREAKING" | ||
] | ||
} | ||
} | ||
], | ||
[ | ||
"@semantic-release/release-notes-generator", | ||
{ | ||
"preset": "angular", | ||
"parserOpts": { | ||
"noteKeywords": [ | ||
"BREAKING CHANGE", | ||
"BREAKING CHANGES", | ||
"BREAKING" | ||
] | ||
}, | ||
"writerOpts": { | ||
"commitsSort": [ | ||
"subject", | ||
"scope" | ||
] | ||
} | ||
} | ||
], | ||
"@semantic-release/changelog", | ||
"@semantic-release/npm", | ||
[ | ||
"semantic-release-haxelib", | ||
{ | ||
"haxelibPublish": true, | ||
"additionalFiles": [] | ||
} | ||
], | ||
"@semantic-release/github", | ||
[ | ||
"@semantic-release/git", | ||
{ | ||
"assets": [ | ||
"dist/**/*.{js,css}", | ||
"*.md", | ||
"package.json", | ||
"haxelib.json" | ||
] | ||
} | ||
] | ||
], | ||
"preset": "angular" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,29 @@ | ||
## JS | ||
## JS (node) | ||
-cp src | ||
# -D dce=full | ||
-D dce=no | ||
-D js-es=6 | ||
|
||
-lib munit | ||
-lib seedyrng | ||
# DEFINES / MACROS | ||
--macro include('', true, null, ['src']) | ||
|
||
# OUTPUT | ||
-js dist/js/index.js | ||
|
||
--next | ||
# --next | ||
|
||
## C# | ||
-cp src | ||
-D dce=no | ||
-D dll_import | ||
-D no-root | ||
-D dll | ||
|
||
-lib seedyrng | ||
# DEFINES / MACROS | ||
# --macro addGlobalMetadata('*', '@:nativeGen') | ||
--macro include('', true, null, ['src']) | ||
|
||
# OUTPUT | ||
-cs dist/cs/rules_engine | ||
# -cp src | ||
# -D dce=no | ||
# -D dll_import | ||
# -D no-root | ||
# -D dll | ||
# | ||
# -lib seedyrng | ||
# # DEFINES / MACROS | ||
# # --macro addGlobalMetadata('*', '@:nativeGen') | ||
# --macro include('', true, null, ['src']) | ||
# | ||
# # OUTPUT | ||
# -cs dist/cs/langgen |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,18 +5,25 @@ | |
"author": "vantreeseba <[email protected]>", | ||
"repository": "github:dropecho/langgen", | ||
"main": "dist/js/index.js", | ||
"browser": "dist/js/langgen.js", | ||
"files": [ | ||
"dist/js/index.js" | ||
], | ||
"license": "MIT", | ||
"scripts": { | ||
"build": "haxe build.hxml", | ||
"test": "haxelib run munit t", | ||
"test-debug": "haxelib run munit t -debug", | ||
"build-changelog": "conventional-changelog -i CHANGELOG.md -s -r 0", | ||
"bump": "npm version --no-git-tag-version", | ||
"haxe:submit": "haxelib run submit", | ||
"version": "npm run build-changelog && npm run build", | ||
"postversion": "git add . && git commit -m 'version' && npm run haxe:submit && npm publish" | ||
"test-debug": "haxelib run munit t -debug" | ||
}, | ||
"devDependencies": { | ||
"@semantic-release/changelog": "^5.0.1", | ||
"@semantic-release/commit-analyzer": "^8.0.1", | ||
"@semantic-release/exec": "^5.0.0", | ||
"@semantic-release/git": "^9.0.0", | ||
"@semantic-release/github": "^7.0.7", | ||
"@semantic-release/npm": "^7.0.5", | ||
"@semantic-release/release-notes-generator": "^9.0.1", | ||
"semantic-release": "^17.1.1", | ||
"semantic-release-haxelib": "^0.3.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters