New name
This commit is contained in:
parent
42209d2c11
commit
04ed112080
|
@ -1,5 +1,5 @@
|
|||
[](https://github.com/crazy-max/ghaction-goreleaser/releases/latest)
|
||||
[](https://github.com/marketplace/actions/goreleaser)
|
||||
[](https://github.com/marketplace/actions/goreleaser-action)
|
||||
[](https://github.com/crazy-max/ghaction-goreleaser/actions)
|
||||
[](https://www.patreon.com/crazymax)
|
||||
[](https://www.paypal.me/crazyws)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# https://help.github.com/en/articles/metadata-syntax-for-github-actions
|
||||
name: 'GoReleaser'
|
||||
name: 'GoReleaser Action'
|
||||
description: 'GitHub Action for GoReleaser, a release automation tool for Go projects'
|
||||
author: 'crazy-max'
|
||||
branding:
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
"use strict";
|
||||
var GitHubApi = require('github');
|
||||
var semver = require('semver');
|
||||
module.exports = function (user, repo, opts) {
|
||||
opts = opts || {};
|
||||
return new Promise(function (resolve, reject) {
|
||||
var github = new GitHubApi({
|
||||
// debug: true,
|
||||
protocol: 'https',
|
||||
host: 'api.github.com',
|
||||
headers: {
|
||||
'user-agent': 'http://npmjs.com/package/latest-github-tag' // required, can be whatever
|
||||
},
|
||||
timeout: opts.timeout || 5000
|
||||
});
|
||||
if (opts.auth) {
|
||||
github.authenticate(opts.auth);
|
||||
}
|
||||
github.repos.getTags({
|
||||
user: user,
|
||||
repo: repo
|
||||
}, function (err, tags) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
if (!tags.length) {
|
||||
return reject(new Error('No tags found for ' + user + '/' + repo));
|
||||
}
|
||||
var tagsSorted = tags.map(function (item) {
|
||||
return item.name;
|
||||
})
|
||||
.filter(semver.valid)
|
||||
.sort(semver.rcompare);
|
||||
resolve(tagsSorted[0]);
|
||||
});
|
||||
});
|
||||
};
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "goreleaser",
|
||||
"name": "goreleaser-action",
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "goreleaser",
|
||||
"name": "goreleaser-action",
|
||||
"description": "GitHub Action for GoReleaser, a release automation tool for Go projects",
|
||||
"main": "lib/main.js",
|
||||
"directories": {
|
||||
|
|
Loading…
Reference in New Issue