name: Release on: push: tags: - "v*" permissions: contents: write jobs: release: runs-on: ubuntu-latest timeout-minutes: 30 steps: - name: Check out repository uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go uses: actions/setup-go@v5 with: go-version-file: go.mod - name: Install archive tooling run: sudo apt-get update && sudo apt-get install -y zip unzip - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: version: "~> v2" args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Post-release packaging run: ./scripts/release/post-goreleaser.sh - name: Setup Node.js uses: actions/setup-node@v4 with: node-version: "20" registry-url: "https://registry.npmjs.org" - name: Publish to npm working-directory: dist/npm/dingtalk-workspace-cli run: npm publish --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}