diff --git a/README.md b/README.md index 9a4f4aa1..a59c835c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![GitHub release](https://img.shields.io/github/release/crazy-max/ghaction-goreleaser.svg?style=flat-square)](https://github.com/crazy-max/ghaction-goreleaser/releases/latest) -[![GitHub marketplace](https://img.shields.io/badge/marketplace-goreleaser-blue?logo=github&style=flat-square)](https://github.com/marketplace/actions/goreleaser) +[![GitHub marketplace](https://img.shields.io/badge/marketplace-goreleaser--action-blue?logo=github&style=flat-square)](https://github.com/marketplace/actions/goreleaser-action) [![Test workflow](https://github.com/crazy-max/ghaction-goreleaser/workflows/test/badge.svg)](https://github.com/crazy-max/ghaction-goreleaser/actions) [![Support me on Patreon](https://img.shields.io/badge/donate-patreon-f96854.svg?logo=patreon&style=flat-square)](https://www.patreon.com/crazymax) [![Paypal Donate](https://img.shields.io/badge/donate-paypal-00457c.svg?logo=paypal&style=flat-square)](https://www.paypal.me/crazyws) diff --git a/action.yml b/action.yml index fdee066c..cd95a182 100644 --- a/action.yml +++ b/action.yml @@ -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: diff --git a/lib/github_release.js b/lib/github_release.js deleted file mode 100644 index f292714c..00000000 --- a/lib/github_release.js +++ /dev/null @@ -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]); - }); - }); -}; diff --git a/package-lock.json b/package-lock.json index d9f4cf7e..7217b7fe 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "goreleaser", + "name": "goreleaser-action", "requires": true, "lockfileVersion": 1, "dependencies": { diff --git a/package.json b/package.json index db15dc0c..47aa58ba 100644 --- a/package.json +++ b/package.json @@ -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": {