Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test changes #1

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 21 additions & 13 deletions .github/workflows/ci-goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,41 @@
name: Continuous Integration - GoReleaser
name: Continuous Integration - Test File

on:
push:
branches: [main]
paths: [".goreleaser.yaml"]
pull_request:
branches: [main]
paths: [".goreleaser.yaml"]

jobs:
file-changed:
name: Did the file change
runs-on: ubuntu-20.04
outputs:
changed: ${{ steps.file-check.outputs.changed }}
steps:
- name: Checkout
uses: actions/checkout@v2
- id: file-check
name: Check for the file change
continue-on-error: true
run: |
git diff --quiet main..HEAD -- testfile.txt
echo "::setoutput changed=${?}"
check-goreleaser:
name: Check GoReleaser Configuration
needs: file-changed
name: Check Tested File
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Generate the sources
run: make generate-sources

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: ${{ needs.file-changed.outputs.changed == '1' }}
with:
version: latest
args: --snapshot --rm-dist --timeout 1h
- name: Skip Check
if: ${{ needs.file-changed.outputs.changed == '0' }}
run: echo "Nothing to see here"
1 change: 1 addition & 0 deletions testfile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Test the change