Skip to content

Commit 798e140

Browse files
committed
Initial checkin
Based on a PoC done in phly/keep-a-changelog. Signed-off-by: Matthew Weier O'Phinney <[email protected]>
0 parents  commit 798e140

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+5355
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: 'Create major/minor tags'
2+
description: 'Create a list of major and minor versions to tag from the current tag.'
3+
outputs:
4+
original-tag:
5+
description: 'Original tag name'
6+
tags:
7+
description: 'Multiline string with tag names to create, one per line.'
8+
9+
runs:
10+
using: 'node12'
11+
main: 'index.js'
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const core = require('@actions/core');
2+
const semver = require('semver')
3+
4+
let tagRef = core.getInput('tag-ref');
5+
let tag = tagRef.split('/').pop();
6+
7+
let major = semver.major(tag);
8+
let minor = major + '.' + semver.minor(tag);
9+
10+
let tags = [
11+
'v' + major,
12+
'v' + minor,
13+
];
14+
15+
core.info(`Tags: ${JSON.stringify(tags)}`);
16+
core.setOutput('tags', tags.join("\n"));

.github/actions/generate-tags/node_modules/.bin/semver

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/generate-tags/node_modules/.package-lock.json

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/generate-tags/node_modules/@actions/core/LICENSE.md

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/generate-tags/node_modules/@actions/core/README.md

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/generate-tags/node_modules/@actions/core/lib/command.d.ts

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/generate-tags/node_modules/@actions/core/lib/command.js

Lines changed: 79 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/actions/generate-tags/node_modules/@actions/core/lib/command.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)