From 998b87b2343aeca807e4988f48fc104be8b3d97f Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Mon, 14 Sep 2020 15:12:55 +0200 Subject: [PATCH] Automatically publish tagged packages (on tags v*) Signed-off-by: Guillaume Tardif --- .github/workflows/release.yml | 20 ++++++++++++++++++++ publish.sh | 1 + 2 files changed, 21 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2bf5ff5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,20 @@ + +on: + push: + tags: + - 'v*' + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set env + run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:11}) + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + - run: ./publish ${RELEASE_VERSION} + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} \ No newline at end of file diff --git a/publish.sh b/publish.sh index 4a57b53..7e5c997 100755 --- a/publish.sh +++ b/publish.sh @@ -2,6 +2,7 @@ set -e +yarn install yarn build yarn run copy cd src