build #352
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: Build | |
on: | |
merge_group: | |
pull_request: | |
push: | |
branches: | |
- main | |
- release/** | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: cachix/install-nix-action@v23 | |
with: | |
nix_path: nixpkgs=channel:nixos-22.11 | |
extra_nix_config: | | |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} | |
- id: changed-files | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: | | |
**/*.go | |
*.mod | |
*.sum | |
- uses: cachix/cachix-action@v12 | |
if: steps.changed-files.outputs.any_changed == 'true' | |
with: | |
name: cronos | |
# github don't pass secrets for pull request from fork repos, | |
# in that case the push is disabled naturally. | |
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}" | |
- name: Run build | |
run: ./scripts/release.sh | |
if: steps.changed-files.outputs.any_changed == 'true' | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "cronosd-tarball-${{ matrix.os }}" | |
path: "*.tar.gz" | |
if-no-files-found: ignore |