👷 Adds Rudimentary Continuous Delivery Pipeline

This commit is contained in:
Bruce Markham
2020-03-15 20:44:27 -04:00
parent f2871069bc
commit 5ee5d2209a
6 changed files with 147 additions and 1 deletions

8
.EditorConfig Normal file
View File

@@ -0,0 +1,8 @@
root = true
[*]
insert_final_newline = true
indent_style = space
[*.js]
indent_size = 2

View File

@@ -0,0 +1,42 @@
name: Build & Test
on:
pull_request:
branches:
- master
- alpha
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@2.1.1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm ci
run: |
npm ci
env:
CI: true
- name: npm build & test
run: |
npm run build
npm run test
env:
CI: true

50
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: Release
on:
push:
branches:
- master
- alpha
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@2.1.1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: npm ci
run: |
npm ci
env:
CI: true
- name: npm build & test
run: |
npm run build
npm run test
env:
CI: true
- name: npm semantic-release
run: |
npm run semantic-release
env:
CI: true
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
node_modules
antlr4ts_out
lib
dist

View File

@@ -15,7 +15,8 @@
"build": "npm run build.cpygrammars && npm run build.antlr4ts && npm run build.tsc",
"prepublishOnly": "npm run build && npm run test",
"postversion": "git push && git push --tags",
"semantic-release": "semantic-release"
"semantic-release": "semantic-release --debug",
"semantic-release-dry-run": "semantic-release --dry-run --debug"
},
"repository": {
"type": "git",

44
release.config.js Normal file
View File

@@ -0,0 +1,44 @@
module.exports = {
branches: [
"+([0-9])?(.{+([0-9]),x}).x",
"master",
{ name: "beta", prerelease: true },
{ name: "alpha", prerelease: true }
],
plugins: [
[
"semantic-release-gitmoji",
{
releaseRules: {
major: ["💥"],
minor: ["✨", "🏗", "⚡"],
patch: ["🐛", "🚑", "🔒", "♻", "💚", "⬆", "⬇", "", "", "🔧", "📝", "🔥", "👷‍♂️", "🔨", "⏪", "🚚"]
}
}
],
[
"@semantic-release/npm",
{
npmPublish: true,
tarballDir: "./dist/"
}
],
[
"@semantic-release/git",
{
message: "🔖 ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
assets: [
{
path: "./dist/*.tgz",
name: "vb6-antlr4-${nextRelease.version}.tgz"
}
]
}
]
]
};