This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
Doric/.github/workflows/publish.yml
2020-03-25 16:16:35 +08:00

53 lines
1.6 KiB
YAML

name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: macos-latest
steps:
- uses: actions/checkout@v1
- name: setup JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- uses: actions/setup-node@v1
with:
node-version: 10
registry-url: 'https://registry.npmjs.org'
- name: Config Github Account
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.email "pengfeizhou@foxmail.com"
git config user.name "pengfei.zhou"
git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
git checkout master
- name: Setup
run: sh setup.sh
- name: Install Cocoapods
run: |
gem install cocoapods
- name: Echo current Version
run: |
echo ${GITHUB_REF:11}>version
echo "Current Version is "${GITHUB_REF:11}
- name: Publish
run: |
sh publish.sh
env:
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
BINTARY_USER: ${{ secrets.BINTARY_USER }}
BINTARY_REPO: ${{ secrets.BINTARY_REPO }}
BINTARY_APIKEY: ${{ secrets.BINTARY_APIKEY }}
- name: Publish legacy
run: |
sh publish-android-legacy.sh
env:
BINTARY_USER: ${{ secrets.BINTARY_USER }}
BINTARY_REPO: ${{ secrets.BINTARY_REPO }}
BINTARY_APIKEY: ${{ secrets.BINTARY_APIKEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}