mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Merge pull request #124 from AZMCode/master
Fix for previous bugs in the workflow
This commit is contained in:
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@@ -1,6 +1,8 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on: ["push"]
|
|
||||||
|
on: "workflow_dispatch"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
# Test:
|
# Test:
|
||||||
@@ -19,6 +21,10 @@ jobs:
|
|||||||
# run: npm run test
|
# run: npm run test
|
||||||
Build:
|
Build:
|
||||||
runs-on: ubuntu-latest
|
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 represent a sequence of tasks that will be executed as part of the job
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Commit
|
- name: Checkout Commit
|
||||||
@@ -26,7 +32,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Parsing Package Info
|
- name: Parsing Package Info
|
||||||
id: packageInfo
|
id: packageInfo
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=package-name::$(jq -r .name package.json)"
|
echo "::set-output name=package-name::$(jq -r .name package.json)"
|
||||||
echo "::set-output name=package-version::$(jq -r .version package.json)"
|
echo "::set-output name=package-version::$(jq -r .version package.json)"
|
||||||
@@ -41,7 +46,6 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: npm run build:all
|
run: npm run build:all
|
||||||
|
|
||||||
|
|
||||||
- name: Upload a Build Artifact
|
- name: Upload a Build Artifact
|
||||||
uses: actions/upload-artifact@v2.1.4
|
uses: actions/upload-artifact@v2.1.4
|
||||||
with:
|
with:
|
||||||
@@ -51,12 +55,14 @@ jobs:
|
|||||||
lib/**/*
|
lib/**/*
|
||||||
package.json
|
package.json
|
||||||
|
|
||||||
|
|
||||||
Publish-Docs:
|
Publish-Docs:
|
||||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/master'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: Build
|
needs: Build
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Download Build Artifact
|
- name: Download Build Artifact
|
||||||
uses: actions/download-artifact@v2.0.5
|
uses: actions/download-artifact@v2.0.5
|
||||||
with:
|
with:
|
||||||
@@ -75,7 +81,7 @@ jobs:
|
|||||||
|
|
||||||
Publish-Package:
|
Publish-Package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/master'
|
||||||
needs: Build
|
needs: Build
|
||||||
steps:
|
steps:
|
||||||
- name: Download Build Artifact
|
- name: Download Build Artifact
|
||||||
@@ -87,9 +93,12 @@ jobs:
|
|||||||
- name: Setup Node.js environment
|
- name: Setup Node.js environment
|
||||||
uses: actions/setup-node@v2.1.1
|
uses: actions/setup-node@v2.1.1
|
||||||
|
|
||||||
|
|
||||||
|
- name: Debug Release Creation
|
||||||
|
run: echo "${{ toJson(needs) }}"
|
||||||
|
|
||||||
- name: Create Release
|
- name: Create Release
|
||||||
id: releaseCreate
|
id: releaseCreate
|
||||||
continue-on-error: true
|
|
||||||
uses: actions/create-release@v1
|
uses: actions/create-release@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -112,7 +121,6 @@ jobs:
|
|||||||
run: mv *.tgz npmPackage.tgz
|
run: mv *.tgz npmPackage.tgz
|
||||||
|
|
||||||
- name: Upload Package to Release
|
- name: Upload Package to Release
|
||||||
continue-on-error: true
|
|
||||||
uses: actions/upload-release-asset@v1.0.2
|
uses: actions/upload-release-asset@v1.0.2
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in New Issue
Block a user