feat: Add lockfile attestor #2318
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
# Copyright 2022 The Witness Contributors | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
name: release | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
fmt: | |
uses: ./.github/workflows/witness.yml | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read | |
with: | |
pull_request: ${{ github.event_name == 'pull_request' }} | |
step: fmt | |
attestations: "git github environment" | |
command: go fmt ./... | |
sast: | |
needs: [fmt] | |
uses: ./.github/workflows/witness.yml | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read | |
with: | |
pull_request: ${{ github.event_name == 'pull_request' }} | |
step: sast | |
attestations: "git github environment" | |
command: go vet ./... | |
unit-test: | |
needs: [fmt] | |
uses: ./.github/workflows/witness.yml | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read | |
with: | |
pull_request: ${{ github.event_name == 'pull_request' }} | |
step: unit-test | |
attestations: "git github environment" | |
command: go test -v -coverprofile=profile.cov -covermode=atomic ./... | |
artifact-upload-name: profile.cov | |
artifact-upload-path: profile.cov | |
release: | |
needs: [fmt, sast, unit-test] | |
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # This is required for the action to work correctly | |
steps: | |
- name: Checkout | |
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 | |
- name: Release | |
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 |