From dbf6465ac8f7f2ee50e9e0207d455c80838f56bb Mon Sep 17 00:00:00 2001 From: Kyle Huggins Date: Wed, 24 Jan 2024 19:50:01 -0600 Subject: [PATCH] Revert "chore: temporarily remove actions" This reverts commit a864ed9aa64d2631618ad7d9c12c9b0e25dbc1ee. --- .github/workflows/build.yml | 37 ++++++++++++++++++++++++++++++++ .github/workflows/codeql.yml | 40 +++++++++++++++++++++++++++++++++++ .github/workflows/release.yml | 19 +++++++++++++++++ .github/workflows/triage.yml | 31 +++++++++++++++++++++++++++ 4 files changed, 127 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/codeql.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/triage.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0977861 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + lfs: 'true' + + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version-file: 'go.mod' + + - name: Install dependencies + run: | + go install github.com/mickael-menu/tesh@latest + + - name: Build + run: make build + + - name: Test + run: make test + + - name: Tesh + # See https://github.com/actions/runner/issues/241#issuecomment-924327172 + shell: script --return --quiet --command "bash {0}" + run: make tesh + diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..75b8044 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,40 @@ +name: "CodeQL code scanning" + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + # Wed 23:33 UTC + - cron: '33 23 * * 3' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'go' ] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + + - name: Autobuild + uses: github/codeql-action/autobuild@v3 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..25df6e1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,19 @@ +name: Release + +on: + workflow_dispatch: + push: + tags: + - 'v*' + +jobs: + homebrew: + runs-on: macos-latest + steps: + - name: Checkout repo + uses: actions/checkout@v4 + - name: Update Homebrew formula + uses: dawidd6/action-homebrew-bump-formula@v3 + with: + token: ${{secrets.HOMEBREW_GITHUB_TOKEN}} + formula: zk diff --git a/.github/workflows/triage.yml b/.github/workflows/triage.yml new file mode 100644 index 0000000..f6a5e30 --- /dev/null +++ b/.github/workflows/triage.yml @@ -0,0 +1,31 @@ +name: Triage + +on: + push: + paths: + - .github/workflows/triage.yml + schedule: + # Once every day at midnight UTC + - cron: "0 0 * * *" + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-stale: 30 + + days-before-issue-close: 5 + stale-issue-label: 'stale' + stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in the next 5 days.' + close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' + exempt-issue-labels: 'help wanted,feature request,enhancement,bug' + + days-before-pr-close: -1 + stale-pr-label: 'stale' + stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity.'