Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
varunsridharan committed Oct 1, 2020
2 parents 9310f20 + cdccf76 commit 73741cb
Show file tree
Hide file tree
Showing 3 changed files with 222 additions and 0 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/npm-github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: On Release

env:
DIST_LOCATION: "./dist/"
NPM_SOPE: "@"
VS_WORKFLOW_TYPE: "gpr-npm-release"

on:
push:
branches:
- master
- main
paths:
- 'package.json'
tags-ignore:
- '*'

jobs:
publish-npm:
name: "🚀 GPR - NPM Publisher"
runs-on: ubuntu-latest
steps:
- name: "📥 Fetching Repository Contents"
uses: actions/checkout@main

- name: "💾 Github Repository Metadata"
uses: varunsridharan/action-repository-meta@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "💫 VS Utility"
uses: varunsridharan/action-vs-utility@main

- name: "⚡ Repository - Before Hook"
run: |
echo " "
if [ -f $VS_BEFORE_HOOK_FILE_LOCATION ]; then
echo "✅ Before Hook File Found : $VS_BEFORE_HOOK_FILE_LOCATION"
sh $VS_BEFORE_HOOK_FILE_LOCATION
else
echo "⚠️ No Before Hook File Found : $VS_BEFORE_HOOK_FILE_LOCATION"
fi
echo " "
- name: "📐 Installing & Setting UP [NPM]"
uses: actions/setup-node@v1
with:
registry-url: 'https://npm.pkg.github.com'
scope: ${{env.NPM_SOPE}}${{env.GITHUB_REPOSITORY_OWNER}}

- name: "🚀 Publishing Release"
id: npmpublisher
uses: g-actions/npm-publish@main
with:
token: ${{ secrets.GITHUB_TOKEN }}
registry: 'https://npm.pkg.github.com'

- if: steps.npmpublisher.type != 'none'
name: "🚀🚀 Creating Github Tag & Release"
uses: webclipper/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GH_PUBLIC_REPO }}
with:
tag_name: ${{steps.npmpublisher.outputs.version}}
release_name: ${{steps.npmpublisher.outputs.version}}
body: |
---
### ___Please Refer [CHANGELOG.md](CHANGELOG.md) detailed information on this release___
---
draft: false
allow_duplicate: true
prerelease: false

- name: "⚡ Repository - After Hook"
run: |
echo " "
if [ -f $VS_AFTER_HOOK_FILE_LOCATION ]; then
echo "✅ After Hook File Found : $VS_AFTER_HOOK_FILE_LOCATION"
sh $VS_AFTER_HOOK_FILE_LOCATION
else
echo "⚠️ No After Hook File Found : $VS_AFTER_HOOK_FILE_LOCATION"
fi
echo " "
81 changes: 81 additions & 0 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: On NPM Release

env:
DIST_LOCATION: "./dist/"
VS_WORKFLOW_TYPE: "npm-release"

on:
push:
branches:
- master
- main
paths:
- 'package.json'
tags-ignore:
- '*'

jobs:
publish-npm:
name: "🚀 NPM Publisher"
runs-on: ubuntu-latest
steps:
- name: "📥 Fetching Repository Contents"
uses: actions/checkout@main

- name: "💾 Github Repository Metadata"
uses: varunsridharan/action-repository-meta@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "💫 VS Utility"
uses: varunsridharan/action-vs-utility@main

- name: "⚡ Repository - Before Hook"
run: |
echo " "
if [ -f $VS_BEFORE_HOOK_FILE_LOCATION ]; then
echo "✅ Before Hook File Found : $VS_BEFORE_HOOK_FILE_LOCATION"
sh $VS_BEFORE_HOOK_FILE_LOCATION
else
echo "⚠️ No Before Hook File Found : $VS_BEFORE_HOOK_FILE_LOCATION"
fi
echo " "
- name: "📐 Installing & Setting UP [NPM]"
uses: actions/setup-node@v1
with:
registry-url: 'https://registry.npmjs.org'

- name: "🚀 Publishing Release"
id: npmpublisher
uses: g-actions/npm-publish@main
with:
token: ${{ secrets.NPM_TOKEN }}
registry: 'https://registry.npmjs.org'

- if: steps.npmpublisher.type != 'none'
name: "🚀🚀 Creating Github Tag & Release"
uses: webclipper/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GH_PUBLIC_REPO }}
with:
tag_name: ${{steps.npmpublisher.outputs.version}}
release_name: ${{steps.npmpublisher.outputs.version}}
body: |
---
### ___Please Refer [CHANGELOG.md](CHANGELOG.md) detailed information on this release___
---
draft: false
allow_duplicate: true
prerelease: false

- name: "⚡ Repository - After Hook"
run: |
echo " "
if [ -f $VS_AFTER_HOOK_FILE_LOCATION ]; then
echo "✅ After Hook File Found : $VS_AFTER_HOOK_FILE_LOCATION"
sh $VS_AFTER_HOOK_FILE_LOCATION
else
echo "⚠️ No After Hook File Found : $VS_AFTER_HOOK_FILE_LOCATION"
fi
echo " "
58 changes: 58 additions & 0 deletions .github/workflows/twitter-post.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Twitter Post On Release

env:
VS_WORKFLOW_TYPE: "twitter-post"

on:
release:
types:
- published

jobs:
twitter_post:
name: "🐦 Tweet"
runs-on: ubuntu-latest
steps:
- name: "📥 Fetching Repository Contents"
uses: actions/checkout@main

- name: "💾 Github Repository Metadata"
uses: varunsridharan/action-repository-meta@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: "💫 VS Utility"
uses: varunsridharan/action-vs-utility@main
env:
SVA_ONL_TOKEN: ${{ secrets.SVA_ONL_TOKEN }}

- name: "⚡ Repository - Before Hook"
run: |
echo " "
if [ -f $VS_BEFORE_HOOK_FILE_LOCATION ]; then
echo "✅ Before Hook File Found : $VS_BEFORE_HOOK_FILE_LOCATION"
sh $VS_BEFORE_HOOK_FILE_LOCATION
else
echo "⚠️ No Before Hook File Found : $VS_BEFORE_HOOK_FILE_LOCATION"
fi
echo " "
- name: "🚀 Publishing Tweet 🐦 "
uses: m1ner79/Github-Twittction@master
with:
twitter_status: ${{ env.TWITTER_STATUS }}
twitter_consumer_key: ${{ secrets.TWITTER_API_KEY }}
twitter_consumer_secret: ${{ secrets.TWITTER_API_SECRET_KEY }}
twitter_access_token_key: ${{ secrets.TWITTER_ACCESS_TOKEN }}
twitter_access_token_secret: ${{ secrets.TWITTER_ACCESS_SECRET_TOKEN }}

- name: "⚡ Repository - After Hook"
run: |
echo " "
if [ -f $VS_AFTER_HOOK_FILE_LOCATION ]; then
echo "✅ After Hook File Found : $VS_AFTER_HOOK_FILE_LOCATION"
sh $VS_AFTER_HOOK_FILE_LOCATION
else
echo "⚠️ No After Hook File Found : $VS_AFTER_HOOK_FILE_LOCATION"
fi
echo " "

0 comments on commit 73741cb

Please sign in to comment.