mirror of
https://github.com/mtkennerly/dunamai-action.git
synced 2025-06-20 14:30:48 +00:00
Use matrix for CI
This commit is contained in:
parent
9673b0868c
commit
16ba39f59a
3 changed files with 18 additions and 8 deletions
13
.github/workflows/main.yaml
vendored
13
.github/workflows/main.yaml
vendored
|
@ -13,6 +13,7 @@ jobs:
|
||||||
python-version: '3.7'
|
python-version: '3.7'
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
# This is necessary so that we have the tags.
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
|
@ -21,7 +22,13 @@ jobs:
|
||||||
- run: echo $MY_VERSION
|
- run: echo $MY_VERSION
|
||||||
|
|
||||||
complete:
|
complete:
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os:
|
||||||
|
- ubuntu-latest
|
||||||
|
- windows-latest
|
||||||
|
- macos-latest
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/setup-python@v2
|
- uses: actions/setup-python@v2
|
||||||
with:
|
with:
|
||||||
|
@ -30,9 +37,11 @@ jobs:
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- uses: ./
|
- uses: ./
|
||||||
|
id: dunamai
|
||||||
with:
|
with:
|
||||||
install: '1.2.0'
|
install: '1.2.0'
|
||||||
env-var: MY_VERSION
|
env-var: MY_VERSION
|
||||||
command: dunamai from git
|
command: dunamai from git
|
||||||
args: --style semver
|
args: --style semver
|
||||||
- run: echo $MY_VERSION
|
- run: echo $MY_VERSION from environment variable
|
||||||
|
- run: echo ${{ steps.dunamai.outputs.version }} from outputs
|
||||||
|
|
7
dist/index.js
vendored
7
dist/index.js
vendored
|
@ -64,15 +64,16 @@ module.exports = require("child_process");
|
||||||
/***/ }),
|
/***/ }),
|
||||||
|
|
||||||
/***/ 325:
|
/***/ 325:
|
||||||
/***/ (function(__unusedmodule, __unusedexports, __webpack_require__) {
|
/***/ (function(__unusedmodule, exports, __webpack_require__) {
|
||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
var core = __webpack_require__(470);
|
var core = __webpack_require__(470);
|
||||||
var execSync = __webpack_require__(129).execSync;
|
var child_process_1 = __webpack_require__(129);
|
||||||
function runCommand(command) {
|
function runCommand(command) {
|
||||||
console.log("Running command: " + command);
|
console.log("Running command: " + command);
|
||||||
return execSync(command);
|
return child_process_1.execSync(command);
|
||||||
}
|
}
|
||||||
function main() {
|
function main() {
|
||||||
var install = core.getInput("install");
|
var install = core.getInput("install");
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
const core = require("@actions/core");
|
import * as core from "@actions/core";
|
||||||
const { execSync } = require("child_process");
|
import { execSync } from "child_process";
|
||||||
|
|
||||||
function runCommand(command: string): Buffer {
|
function runCommand(command: string): Buffer {
|
||||||
console.log(`Running command: ${command}`);
|
console.log(`Running command: ${command}`);
|
||||||
return execSync(command);
|
return execSync(command);
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function main(): void {
|
||||||
const install = core.getInput("install");
|
const install = core.getInput("install");
|
||||||
const envVar = core.getInput("env-var");
|
const envVar = core.getInput("env-var");
|
||||||
const command = core.getInput("command");
|
const command = core.getInput("command");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue