diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..26b73d8 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release +on: [workflow_dispatch] +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '16.x' + cache: 'yarn' + + - name: Install dependencies + run: | + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc + yarn install --immutable + + - name: Lint + run: yarn lint + + - name: Build + run: yarn build + + - name: Package + run: yarn package + + - name: get-npm-version + id: package-version + uses: martinbeentjes/npm-get-version-action@main + + - name: Publish Release on Github + uses: marvinpinto/action-automatic-releases@latest + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + automatic_release_tag: ${{ steps.package-version.outputs.current-version}} + prerelease: false + files: | + release/**/*