From 49ceb4839160947df1339aff4b8246028acecf25 Mon Sep 17 00:00:00 2001 From: Yevhen Laichenkov Date: Thu, 5 Aug 2021 13:08:00 +0300 Subject: [PATCH] add(ci): manual publish --- .github/workflows/release.yml | 47 +++++++++++++ .gitignore | 124 ++++++++++++++++++++++++++++++++++ 2 files changed, 171 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .gitignore diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e1fa2e6 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,47 @@ +name: Manual NPM Publish + +on: + workflow_dispatch: + inputs: + releaseType: + description: 'Release type - major, minor or patch' + required: true + default: 'patch' + distTag: + description: 'NPM tag (e.g. use "next" to release a test version)' + required: true + default: 'latest' + +env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: 'main' + fetch-depth: 0 + - uses: actions/setup-node@v1 + with: + node-version: 14.x + - name: NPM Setup + run: | + npm set registry "https://registry.npmjs.org/" + npm set //registry.npmjs.org/:_authToken $NPM_TOKEN + npm whoami + - name: Git Setup + run: | + git config --global user.email "elaichenkov@gmail.com" + - name: Install Dependencies + run: npm ci + - name: Build Project + run: npm run build + env: + NODE_ENV: production + - name: Release + run: npm run release:ci -- ${{github.event.inputs.releaseType}} --npm.tag=${{github.event.inputs.distTag}} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e4ffa6f --- /dev/null +++ b/.gitignore @@ -0,0 +1,124 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +.pnpm-debug.log* + +# Diagnostic reports (https://nodejs.org/api/report.html) +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (https://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ +jspm_packages/ + +# Snowpack dependency directory (https://snowpack.dev/) +web_modules/ + +# TypeScript cache +*.tsbuildinfo + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Microbundle cache +.rpt2_cache/ +.rts2_cache_cjs/ +.rts2_cache_es/ +.rts2_cache_umd/ + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env +.env.test +.env.production + +# parcel-bundler cache (https://parceljs.org/) +.cache +.parcel-cache + +# Next.js build output +.next +out + +# Nuxt.js build / generate output +.nuxt +dist + +# Gatsby files +.cache/ +# Comment in the public line in if your project uses Gatsby and not Next.js +# https://nextjs.org/blog/next-9-1#public-directory-support +# public + +# vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# TernJS port file +.tern-port + +# Stores VSCode versions used for testing VSCode extensions +.vscode-test + +# yarn v2 +.yarn/cache +.yarn/unplugged +.yarn/build-state.yml +.yarn/install-state.gz +.pnp.* + +# cypress folder +cypress/downloads +cypress/fixtures +cypress/screenshots +cypress/videos \ No newline at end of file