⬆️ Bump goreleaser/goreleaser-action from 4 to 5 #141
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'CI' | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: | |
contents: write | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: golangci-lint | |
uses: golangci/[email protected] | |
with: | |
version: latest | |
test: | |
runs-on: ${{ matrix.os }} | |
needs: [ lint ] | |
permissions: | |
checks: write | |
pull-requests: write | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- if: ${{ matrix.os == 'ubuntu-latest' }} | |
uses: docker/login-action@v2 | |
with: | |
registry: registry.jetbrains.team | |
username: ${{ secrets.SPACE_USERNAME }} | |
password: ${{ secrets.SPACE_PASSWORD }} | |
- run: go test -v ./... -coverprofile cover.out | |
env: | |
QODANA_TOKEN: ${{ secrets.TEST_QODANA_TOKEN }} | |
- if: startsWith(matrix.os, 'ubuntu') | |
uses: JetBrains/qodana-action@main | |
env: | |
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} | |
- if: startsWith(matrix.os, 'ubuntu') | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: go | |
- if: startsWith(matrix.os, 'ubuntu') | |
uses: github/codeql-action/autobuild@v2 | |
- if: startsWith(matrix.os, 'ubuntu') | |
uses: github/codeql-action/analyze@v2 | |
package: | |
# needs: [ lint, test ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: 1.19 | |
- name: install chocolatey | |
run: | | |
mkdir -p /opt/chocolatey | |
wget -q -O - "https://github.com/chocolatey/choco/releases/download/${CHOCOLATEY_VERSION}/chocolatey.v${CHOCOLATEY_VERSION}.tar.gz" | tar -xz -C "/opt/chocolatey" | |
echo '#!/bin/bash' >> /usr/local/bin/choco | |
echo 'mono /opt/chocolatey/choco.exe $@' >> /usr/local/bin/choco | |
chmod +x /usr/local/bin/choco | |
env: | |
CHOCOLATEY_VERSION: 1.2.0 | |
- run: git tag -d nightly || true | |
- uses: goreleaser/goreleaser-action@v5 | |
with: | |
distribution: goreleaser | |
version: latest | |
args: --snapshot --clean --debug | |
- if: github.ref == 'refs/heads/main' | |
run: | | |
cd dist | |
gh release --repo JetBrains/qodana-cli delete nightly -y || true | |
git push --delete origin nightly || true | |
gh release --repo JetBrains/qodana-cli create nightly -p -t nightly | |
gh release --repo JetBrains/qodana-cli upload nightly \ | |
qodana_darwin_all.tar.gz \ | |
qodana_linux_arm64.tar.gz \ | |
qodana_linux_x86_64.tar.gz \ | |
qodana_windows_arm64.zip \ | |
qodana_windows_x86_64.zip | |
gh release --repo JetBrains/qodana-cli edit nightly --draft=false | |
env: | |
GH_TOKEN: ${{ github.token }} | |
install-script-check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
./install |