diff --git a/.github/workflows/public.yml b/.github/workflows/public.yml new file mode 100644 index 00000000..099ab0f9 --- /dev/null +++ b/.github/workflows/public.yml @@ -0,0 +1,35 @@ +name: Publish +on: + push: + branches: + - 'master' + + +jobs: + publish: + runs-on: ubuntu-18.04 + strategy: + matrix: + node-version: [12] + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - name: Get yarn cache + id: yarn-cache + run: echo "::set-output name=dir::$(yarn cache dir)" + - uses: actions/cache@v2 + with: + path: ${{ steps.yarn-cache.outputs.dir }} + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + - name: Install Dependencies + run: yarn + - name: Publish Package + run: yarn ci:publish + env: + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file diff --git a/package.json b/package.json index b4cfa486..1ccdfcf3 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "android": "react-native run-android", "flow": "flow", "lint": "eslint . --cache", - "tsc": "tsc --noEmit" + "tsc": "tsc --noEmit", + "ci:publish": "yarn semantic-release" }, "peerDependencies": { "react": ">=16.0",