Merge pull request #124 from AZMCode/master

Fix for previous bugs in the workflow
This commit is contained in:
Adhiraj Singh
2020-08-30 23:19:33 +05:30
committed by GitHub

View File

@@ -1,6 +1,8 @@
name: CI
on: ["push"]
on: "workflow_dispatch"
jobs:
# Test:
@@ -19,6 +21,10 @@ jobs:
# run: npm run test
Build:
runs-on: ubuntu-latest
outputs:
package-name: ${{ steps.packageInfo.outputs.package-name }}
package-version: ${{ steps.packageInfo.outputs.package-version }}
commit-msg: ${{ steps.packageInfo.outputs.commit-msg }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout Commit
@@ -26,7 +32,6 @@ jobs:
- name: Parsing Package Info
id: packageInfo
run: |
echo "::set-output name=package-name::$(jq -r .name package.json)"
echo "::set-output name=package-version::$(jq -r .version package.json)"
@@ -40,7 +45,6 @@ jobs:
- name: Build
run: npm run build:all
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.1.4
@@ -51,12 +55,14 @@ jobs:
lib/**/*
package.json
Publish-Docs:
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
needs: Build
steps:
- name: Download Build Artifact
uses: actions/download-artifact@v2.0.5
with:
@@ -75,7 +81,7 @@ jobs:
Publish-Package:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
if: github.ref == 'refs/heads/master'
needs: Build
steps:
- name: Download Build Artifact
@@ -87,9 +93,12 @@ jobs:
- name: Setup Node.js environment
uses: actions/setup-node@v2.1.1
- name: Debug Release Creation
run: echo "${{ toJson(needs) }}"
- name: Create Release
id: releaseCreate
continue-on-error: true
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -112,7 +121,6 @@ jobs:
run: mv *.tgz npmPackage.tgz
- name: Upload Package to Release
continue-on-error: true
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}