diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81e0d40..aa92193 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v4 @@ -18,4 +20,26 @@ jobs: go-version: '1.21' - name: Test - run: go test -v ./... \ No newline at end of file + run: go test -v ./... + + release: + needs: test + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Install semantic-release + run: npm install -g semantic-release @semantic-release/github + + - name: Release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: npx semantic-release \ No newline at end of file