release-kit / semver Goto Github PK
View Code? Open in Web Editor NEWParse semantic version from string or tag
License: MIT License
Parse semantic version from string or tag
License: MIT License
So I have a flow where the first job gets the version data using your action, then the second job does a series of builds based on a matrix. Now if I want the version to locate the latest tag, I assume I'm going to need to pass something to the build job so it can also checkout that same tag.
I figure I can do it by re-contructing the tag from the passed version data and telling checkout to retrieve that tag. But I'm wondering if there is a better way, or perhaps whether semver could also publish the hash of the tag.
Thoughts?
Hi. Trying to use the action for the first time. When I add source: latest-tag
to my workflow it crashes out. Here's my action:
steps:
- name: Parse version from tag
id: version
uses: release-kit/semver@v2
with:
source: latest-tag
pattern: '^Release-(.*)$' # ^v?(.*)$ by default
And here's the error I get:
/Users/runner/work/_actions/release-kit/semver/v2/dist/index.js:6451
error = new Error(message);
^
Error: Command failed with exit code 128: git rev-list --tags --max-count=1
fatal: not a git repository (or any of the parent directories): .git
at makeError$1 (/Users/runner/work/_actions/release-kit/semver/v2/dist/index.js:6451:11)
at handlePromise (/Users/runner/work/_actions/release-kit/semver/v2/dist/index.js:7410:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
shortMessage: 'Command failed with exit code 128: git rev-list --tags --max-count=1',
command: 'git rev-list --tags --max-count=1',
escapedCommand: 'git rev-list --tags "--max-count=1"',
exitCode: 128,
signal: undefined,
signalDescription: undefined,
stdout: '',
stderr: 'fatal: not a git repository (or any of the parent directories): .git',
failed: true,
timedOut: false,
isCanceled: false,
killed: false
anything I might have done wrong?
Note that it works if I remove the source:
line. But means the tag has to be on the last commit.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.