Code Monkey home page Code Monkey logo

semantic-release-surge's Introduction

@eclass/semantic-release-surge

npm build downloads dependencies devDependency Status Test Coverage Maintainability semantic-release

semantic-release plugin to publish a static site with surge.sh

Step Description
verifyConditions Verify the presence of the SURGE_TOKEN environment variable and SURGE_ALIAS environment variable or alias option.
prepare Build assets with a npm script.
publish Upload assets to surge.sh.

Install

npm i -D @eclass/semantic-release-surge

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    "@eclass/semantic-release-surge"
  ]
}

Configuration

Surge authentication

The surge authentication configuration is required and can be set via environment variables.

Environment variables

Variable Description
SURGE_TOKEN Surge token created via surge token
SURGE_ALIAS Optional set surge alias. Example my-awesome-project.surge.sh
SURGE_CNAME Optional set surge custom CNAME. Example my-awesome-project.io

Options

Options Description Default
alias Set de custom alias to surge.sh project. null
buildScriptName npm script to build assets. build
build Indicate if is requerid build assets. false
asstes Indicate the assets directory. dist

Examples

The build and asstes option can be used to skip the build assets:

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    ["@semantic-release/exec", {
      "publishCmd": "npm run build"
    }],
    ["@eclass/semantic-release-surge", {
      "alias": "my-awesome-project.surge.sh",
      "assets": "build",
      "build": false,
    }]
  ]
}

Is posible specificate a custom npm script build and a custom CNAME:

{
  "plugins": [
    "@semantic-release/changelog",
    "@semantic-release/npm",
    "@semantic-release/git",
    "@semantic-release/gitlab",
    ["@eclass/semantic-release-surge", {
      "alias": "my-awesome-project.surge.sh",
      "cname": "my-awesome-project.io",
      "buildScriptName": "build:client"
    }]
  ]
}
{
  "scripts": {
    "build:client": "react-scripts build"
  }
}

License

MIT

semantic-release-surge's People

Contributors

dependabot[bot] avatar eriold avatar lgaticaq avatar renovate-bot avatar renovate[bot] avatar semantic-release-bot avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

semantic-release-surge's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Rate-Limited

These updates are currently rate-limited. Click on a checkbox below to force their creation now.

  • chore(deps): update dependency chai to v4.4.1 (chai, @types/chai)
  • chore(deps): update actions/cache action to v4
  • chore(deps): update dependency chai to v5
  • chore(deps): update dependency eslint to v9
  • chore(deps): update dependency eslint-plugin-promise to v6
  • chore(deps): update dependency eslint-plugin-standard to v5
  • chore(deps): update dependency fs-extra to v11
  • chore(deps): update dependency husky to v9
  • chore(deps): update dependency lint-staged to v15
  • chore(deps): update dependency node to v20 (node, @types/node)
  • chore(deps): update dependency sinon to v18
  • chore(deps): update dependency tempy to v3
  • chore(deps): update semantic-release monorepo (major) (@semantic-release/changelog, @semantic-release/error, @semantic-release/git, @semantic-release/github, @semantic-release/npm)
  • fix(deps): update dependency aggregate-error to v5
  • fix(deps): update dependency execa to v9
  • fix(deps): update dependency read-pkg to v9
  • ๐Ÿ” Create all rate-limited PRs at once ๐Ÿ”

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/node.js.yml
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
  • actions/checkout v3
  • actions/setup-node v3
  • actions/cache v3
npm
package.json
  • @semantic-release/error ^2.1.0
  • aggregate-error ^3.0.0
  • execa ^4.0.0
  • read-pkg ^5.2.0
  • surge ^0.23.0
  • @commitlint/cli 9.1.2
  • @commitlint/config-conventional 9.1.2
  • @semantic-release/changelog 5.0.1
  • @semantic-release/git 9.0.0
  • @semantic-release/github 7.2.2
  • @semantic-release/npm 7.1.3
  • @types/chai 4.3.11
  • @types/mocha 8.2.2
  • @types/node 12.20.12
  • chai 4.4.0
  • eslint 7.32.0
  • eslint-config-standard 14.1.1
  • eslint-plugin-import 2.29.1
  • eslint-plugin-node 11.1.0
  • eslint-plugin-promise 4.3.1
  • eslint-plugin-standard 4.1.0
  • fs-extra 9.1.0
  • husky 4.3.8
  • lint-staged 10.5.4
  • mocha 8.4.0
  • mock-require 3.0.3
  • npm-github-config 2.0.1
  • nyc 15.1.0
  • nyc-config-common 1.0.1
  • prettier-standard 16.4.1
  • semantic-release 17.4.2
  • sinon 9.2.4
  • stream-buffers 3.0.2
  • tempy 0.7.1
  • semantic-release >=11.0.0 <18.0.0 || ^22.0.0
  • node >=10
nvm
.nvmrc
  • node 12.22.12
travis
.travis.yml
  • node 12
  • node 12
  • node 10

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: package.json
Error type: The renovate configuration file contains some invalid settings
Message: Configuration option 'packageRules[0].node' should be a json object, Invalid configuration option: author, Invalid configuration option: bugs, Invalid configuration option: commitlint, Invalid configuration option: eslintConfig, Invalid configuration option: eslintIgnore, Invalid configuration option: homepage, Invalid configuration option: husky, Invalid configuration option: keywords, Invalid configuration option: license, Invalid configuration option: lint-staged, Invalid configuration option: main, Invalid configuration option: name, Invalid configuration option: nyc, Invalid configuration option: packageRules[1].@semantic-release/error, Invalid configuration option: packageRules[1].aggregate-error, Invalid configuration option: packageRules[1].execa, Invalid configuration option: packageRules[1].read-pkg, Invalid configuration option: packageRules[1].surge, Invalid configuration option: packageRules[2].@commitlint/cli, Invalid configuration option: packageRules[2].@commitlint/config-conventional, Invalid configuration option: packageRules[2].@semantic-release/changelog, Invalid configuration option: packageRules[2].@semantic-release/git, Invalid configuration option: packageRules[2].@semantic-release/github, Invalid configuration option: packageRules[2].@semantic-release/npm, Invalid configuration option: packageRules[2].@types/chai, Invalid configuration option: packageRules[2].@types/mocha, Invalid configuration option: packageRules[2].@types/node, Invalid configuration option: packageRules[2].chai, Invalid configuration option: packageRules[2].eslint, Invalid configuration option: packageRules[2].eslint-config-standard, Invalid configuration option: packageRules[2].eslint-plugin-import, Invalid configuration option: packageRules[2].eslint-plugin-node, Invalid configuration option: packageRules[2].eslint-plugin-promise, Invalid configuration option: packageRules[2].eslint-plugin-standard, Invalid configuration option: packageRules[2].fs-extra, Invalid configuration option: packageRules[2].husky, Invalid configuration option: packageRules[2].lint-staged, Invalid configuration option: packageRules[2].mocha, Invalid configuration option: packageRules[2].mock-require, Invalid configuration option: packageRules[2].npm-github-config, Invalid configuration option: packageRules[2].nyc, Invalid configuration option: packageRules[2].nyc-config-common, Invalid configuration option: packageRules[2].prettier-standard, Invalid configuration option: packageRules[2].semantic-release, Invalid configuration option: packageRules[2].sinon, Invalid configuration option: packageRules[2].stream-buffers, Invalid configuration option: packageRules[2].tempy, Invalid configuration option: packageRules[3].semantic-release, Invalid configuration option: release, Invalid configuration option: renovate, Invalid configuration option: scripts, Invalid configuration option: version, The "node" object can only be configured at the top level of a config but was found inside "packageRules[0]"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.