-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
2 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 |
---|---|---|
|
@@ -7,6 +7,38 @@ jobs: | |
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Extract version from tag | ||
uses: damienaicheh/[email protected] | ||
|
||
- name: Output the variables | ||
run: | | ||
echo The major was $MAJOR | ||
echo The minor was $MINOR | ||
echo The patch was $PATCH | ||
echo The pre-release was $PRE_RELEASE | ||
echo The number of commits was $NUMBER_OF_COMMITS | ||
echo The number of commits since tag was $NUMBER_OF_COMMITS_SINCE_TAG | ||
- name: save version file | ||
uses: satackey/[email protected] | ||
id: getdata | ||
with: | ||
# Edit the following line to install packages required to run your script. | ||
required-packages: git-tags | ||
script: | | ||
var gittags = require("git-tags"); | ||
var fs = require("fs"); | ||
gittags.get(function (err, tags) { | ||
if (err) throw err; | ||
const obj = { | ||
version: tags[0], | ||
}; | ||
fs.writeFileSync("version.json", JSON.stringify(obj), "utf8"); | ||
console.log(tags); | ||
}); | ||
- name: Deploy to Vercel Action | ||
uses: BetaHuhn/deploy-to-vercel-action@v1 | ||
with: | ||
|
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
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 +0,0 @@ | ||
{"version":"v0.0.1"} | ||