chore(ci): trigger github release after semantic-release
This commit is contained in:
parent
8ba003aa76
commit
adcfdfa469
|
@ -4,8 +4,6 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
tags:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -15,7 +13,7 @@ jobs:
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "lts/*"
|
node-version: "lts/*"
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
- name: build
|
- name: build
|
||||||
run: |
|
run: |
|
||||||
sh -c "$(curl -sSfL https://release.solana.com/edge/install)"
|
sh -c "$(curl -sSfL https://release.solana.com/edge/install)"
|
||||||
|
@ -41,7 +39,6 @@ jobs:
|
||||||
path: deploy/
|
path: deploy/
|
||||||
|
|
||||||
gh-page:
|
gh-page:
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -55,7 +52,6 @@ jobs:
|
||||||
publish_dir: ./docs
|
publish_dir: ./docs
|
||||||
|
|
||||||
semantic-release:
|
semantic-release:
|
||||||
if: github.ref == 'refs/heads/master'
|
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -63,7 +59,7 @@ jobs:
|
||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "lts/*"
|
node-version: "lts/*"
|
||||||
cache: 'npm'
|
cache: "npm"
|
||||||
- run: |
|
- run: |
|
||||||
npm install -g npm@7
|
npm install -g npm@7
|
||||||
npm install
|
npm install
|
||||||
|
@ -73,19 +69,23 @@ jobs:
|
||||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
|
||||||
gh-release:
|
gh-release:
|
||||||
if: startsWith(github.ref, 'refs/tags')
|
needs: [build, semantic-release]
|
||||||
needs: build
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v3
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
name: build
|
fetch-depth: 0
|
||||||
- name: Compress
|
- name: Get Tag
|
||||||
run: |
|
id: get_tag
|
||||||
tar zcf solanaWeb3Api.tgz docs
|
run: echo "::set-output name=tag::$(git tag --points-at HEAD)"
|
||||||
- name: Release
|
- name: Create Release
|
||||||
uses: softprops/action-gh-release@v1
|
if: steps.get_tag.outputs.tag
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
files: |
|
tag_name: ${{ steps.get_tag.outputs.tag }}
|
||||||
solanaWeb3.min.js
|
release_name: ${{ steps.get_tag.outputs.tag }}
|
||||||
solanaWeb3Api.tgz
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
|
Loading…
Reference in New Issue