From 3e7c393e81b539d4913895684db70dfb32fba564 Mon Sep 17 00:00:00 2001 From: phatpham9 Date: Thu, 27 Feb 2020 13:18:06 +0700 Subject: [PATCH] feat(#4): integrate github actions ci --- .github/workflows/create-github-release.yml | 19 +++++++++++++++++++ .github/workflows/publish-npm.yml | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 .github/workflows/create-github-release.yml create mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml new file mode 100644 index 0000000..97743b1 --- /dev/null +++ b/.github/workflows/create-github-release.yml @@ -0,0 +1,19 @@ +name: create-github-release + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + create-github-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/create-release@v1 + env: + # This token is provided by Actions, you do not need to create your own token + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + tag_name: ${{github.ref}} + release_name: Release ${{github.ref}} diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..5a16d45 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,19 @@ +name: publish-npm + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +jobs: + publish-npm: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}