Skip to content

fix: update U to 1003 #79

fix: update U to 1003

fix: update U to 1003 #79

name: release-please
on:
push:
branches:
- release-1.x
jobs:
release-please:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ 12.x ]
steps:
- uses: GoogleCloudPlatform/release-please-action@v3
id: release
with:
release-type: node
package-name: testRepo
default-branch: release-1.x
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
if: ${{ steps.release.outputs.release_created }}
with:
node-version: ${{ matrix.node-version }}
# See: https://github.com/actions/cache/blob/main/examples.md#node---yarn
- name: Get Yarn cache directory
id: yarn-cache-dir-path
if: ${{ steps.release.outputs.release_created }}
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Use Yarn cache
uses: actions/cache@v2
id: yarn-cache
if: ${{ steps.release.outputs.release_created }}
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# `--prefer-offline` gives cache priority
- name: Install dependencies
if: ${{ steps.release.outputs.release_created }}
run: yarn install --prefer-offline --frozen-lockfile
# Ready to run steps that rely on node_modules
- name: Build
if: ${{ steps.release.outputs.release_created }}
run: |
yarn build
- name: Build
if: ${{ steps.release.outputs.release_created }}
run: |
tar -zcvf 'testRepo-${{ steps.release.outputs.tag_name }}.tar.gz' dist/
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
id: upload-release-asset
if: ${{ steps.release.outputs.release_created }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./testRepo-${{ steps.release.outputs.tag_name }}.tar.gz
asset_name: testRepo-${{ steps.release.outputs.tag_name }}.tar.gz
asset_content_type: application/tgz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - run: npm ci
# if: ${{ steps.release.outputs.release_created }}
# - run: npm publish
# env:
# NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
# if: ${{ steps.release.outputs.release_created }}