-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #143 from amitsingh-007/f-setup-surge-webpack-gh-a…
…ctions
- Loading branch information
Showing
5 changed files
with
635 additions
and
570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
name: Github Action | ||
name: CI | ||
on: push | ||
|
||
jobs: | ||
Deploy: | ||
Build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repo 🛎️ | ||
|
@@ -27,24 +27,40 @@ jobs: | |
- name: Building 🛠 | ||
run: npm run release | ||
|
||
# ----------Below steps are for release process(only executes for master)-------------- | ||
- name: Upload artfacts 🎨 | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build | ||
path: ./build/ | ||
|
||
Release: | ||
runs-on: ubuntu-latest | ||
needs: [Build] | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
steps: | ||
- name: Checkout repo 🛎️ | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download artifacts 🎨 | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build | ||
path: ./build/ | ||
|
||
- name: Generate Release Tag 🏷 | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
uses: amitsingh-007/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Generate changelog 🧾 | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
id: changelog | ||
uses: metcalfc/[email protected] | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Release ✒ | ||
id: create_release | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -56,14 +72,12 @@ jobs: | |
prerelease: false | ||
|
||
- name: Get Release Asset Name 🗃 | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
id: get_release_asset_name | ||
run: | | ||
file=$(find ./build/bypass-links-*.zip -printf "%f\n") | ||
echo "::set-output name=asset_name::$file" | ||
- name: Upload Release Asset ☁ | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
@@ -73,8 +87,21 @@ jobs: | |
asset_name: ${{ steps.get_release_asset_name.outputs.asset_name }} | ||
asset_content_type: application/zip | ||
|
||
Deploy: | ||
runs-on: ubuntu-latest | ||
needs: [Release] | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
steps: | ||
- name: Download artifacts 🎨 | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: build | ||
path: ./build/ | ||
|
||
- name: Deploying to surge.sh 🐙 | ||
run: npx surge -- --token ${{ secrets.SURGE_TOKEN }} | ||
|
||
- name: Deploying to gh-pages 🚀 | ||
if: ${{ github.ref == 'refs/heads/master' }} | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.