diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..85291012 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,35 @@ +name: release + +on: + push: + branches: + - master + +jobs: + ci: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4.1.4 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v4.0.2 + with: + node-version: 20.x + + - name: Install dependencies + run: yarn + + - name: Run build + run: yarn build + + - name: ZIP build + run: zip -r build.zip build + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release --branches master \ No newline at end of file diff --git a/.releaserc.json b/.releaserc.json new file mode 100644 index 00000000..ee154ea1 --- /dev/null +++ b/.releaserc.json @@ -0,0 +1,17 @@ +{ + "plugins": [ + "@semantic-release/commit-analyzer", + "@semantic-release/release-notes-generator", + [ + "@semantic-release/github", + { + "assets": [ + { + "path": "build.zip", + "label": "slim-${nextRelease.gitTag}.zip" + } + ] + } + ] + ] +} \ No newline at end of file