Skip to content

Merge pull request #73 from mutagen-io/v017-backports #293

Merge pull request #73 from mutagen-io/v017-backports

Merge pull request #73 from mutagen-io/v017-backports #293

Workflow file for this run

# Set the workflow name.
name: CI
# Execute the workflow on pushes and pull requests.
on: [push, pull_request]
# Define the workflow jobs.
jobs:
verification:
name: Commit Verification
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Perform commit verification"
run: |
# Determine the target commit range.
export VERIFY_COMMIT_START="${{ github.event.pull_request.base.sha }}"
export VERIFY_COMMIT_END="${{ github.event.pull_request.head.sha }}"
# Perform verification.
scripts/ci/verify_commits.sh
macos:
name: macOS
runs-on: macos-11
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.20.13'
- name: "Install sha256sum"
run: brew install coreutils
- run: scripts/ci/setup_go.sh
- run: scripts/ci/analyze.sh
- run: scripts/ci/test.sh
- run: scripts/ci/build.sh
env:
MACOS_CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
MACOS_CODESIGN_CERTIFICATE_AND_KEY: ${{ secrets.MACOS_CODESIGN_CERTIFICATE_AND_KEY }}
MACOS_CODESIGN_CERTIFICATE_AND_KEY_PASSWORD: ${{ secrets.MACOS_CODESIGN_CERTIFICATE_AND_KEY_PASSWORD }}
- run: scripts/ci/notarize.sh
if: github.ref_type == 'tag'
env:
MACOS_NOTARIZE_APPLE_ID: ${{ secrets.MACOS_NOTARIZE_APPLE_ID }}
MACOS_NOTARIZE_APP_SPECIFIC_PASSWORD: ${{ secrets.MACOS_NOTARIZE_APP_SPECIFIC_PASSWORD }}
MACOS_NOTARIZE_TEAM_ID: ${{ secrets.MACOS_NOTARIZE_TEAM_ID }}
- run: scripts/ci/sha256sum.sh
- uses: crazy-max/ghaction-import-gpg@v3
id: import_gpg
if: github.ref_type == 'tag'
with:
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }}
passphrase: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }}
- run: scripts/ci/sha256sign.sh
if: github.ref_type == 'tag'
env:
SHA256_GPG_SIGNING_IDENTITY: ${{ steps.import_gpg.outputs.email }}
- uses: actions/upload-artifact@v2
with:
name: bundles
path: build/release/*
retention-days: 2
linux:
name: Linux
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
goversion: ['1.19.13', '1.20.13']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.goversion }}
- run: scripts/ci/setup_go.sh
- run: scripts/ci/analyze.sh
- run: scripts/ci/test.sh
- run: scripts/ci/build.sh
windows:
name: Windows
runs-on: windows-latest
timeout-minutes: 60
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.20.13'
- run: scripts/ci/setup_go.sh
shell: bash
- run: scripts/ci/analyze.sh
shell: bash
- run: scripts/ci/test.sh
shell: bash
- run: scripts/ci/build.sh
shell: bash
release:
name: Release
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
needs: [macos, linux, windows]
timeout-minutes: 10
steps:
- uses: actions/download-artifact@v2
with:
name: bundles
path: bundles
- uses: alexellis/upload-assets@0.2.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_paths: '["bundles/*"]'