diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9012baf --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,28 @@ +name: Release + +on: + push: + branches: + - semrel + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Important for Semantic Release to analyze all commits + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '16' + + - name: Run Semantic Release + run: | + npm install + npx semantic-release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.releaserc.yaml b/.releaserc.yaml index 1923fd2..27751b5 100644 --- a/.releaserc.yaml +++ b/.releaserc.yaml @@ -1,6 +1,6 @@ # See https://semantic-release.gitbook.io/semantic-release/usage/configuration branches: - - main + - semrel tagFormat: '${version}' # without this, the tag is prefixed with a 'v' plugins: - "@semantic-release/commit-analyzer"