Skip to content

Drop support for Windows 10 Version 21H2 or previous #5

Drop support for Windows 10 Version 21H2 or previous

Drop support for Windows 10 Version 21H2 or previous #5

Workflow file for this run

name: build
on: [ push, pull_request ]
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
# https://docs.github.com/ja/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
os: [ macos-11, macos-12, macos-13, macos-latest, windows-2019, windows-2022, windows-latest ]
go: [ '1.20' ]
steps:
- uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
with:
go-version: ${{ matrix.go }}
check-latest: true
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- shell: bash
run: echo "xmlpaste_version=1.1.0-dev" >> "$GITHUB_ENV"
- if: runner.os == 'macOS'
run: GOOS=darwin GOARCH=amd64 CGO_ENABLED=1 go build -ldflags "-X main.version=${{ env.xmlpaste_version }}" xmlpaste.go xmlpaste_darwin.go
- if: runner.os == 'Windows'
run: go build -ldflags "-X main.version=${{ env.xmlpaste_version }}" xmlpaste.go xmlpaste_windows.go
- shell: bash
run: echo "goss_commit_hash=32aae7649678efb2270b0644350ab007abe96c40" >> "$GITHUB_ENV" # v0.4.0-rc.3
- shell: bash
run: echo "GOSS_USE_ALPHA=1" >> "$GITHUB_ENV"
- if: runner.os == 'macOS'
run: |
curl -L "https://github.com/goss-org/goss/archive/${{ env.goss_commit_hash }}.tar.gz" -o goss.tar.gz
tar xzvf goss.tar.gz
cd "goss-${{ env.goss_commit_hash }}"
make build
cd ..
- if: runner.os == 'Windows'
shell: bash
run: |
curl -L "https://github.com/goss-org/goss/archive/${{ env.goss_commit_hash }}.tar.gz" -o goss.tar.gz
tar xzvf goss.tar.gz
cd "goss-${{ env.goss_commit_hash }}"
go build -o goss-windows-amd64.exe github.com/goss-org/goss/cmd/goss
mkdir release
mv goss-windows-amd64.exe release/
cd ..
- if: runner.os == 'macOS'
run: |
"./goss-${{ env.goss_commit_hash }}/release/goss-darwin-amd64" --gossfile tests/goss.yaml validate --format documentation
- if: runner.os == 'Windows'
shell: bash
run: |
"./goss-${{ env.goss_commit_hash }}/release/goss-windows-amd64.exe" --gossfile tests/goss-win.yaml validate --format documentation
- run: ./xmlpaste -v
# based on: github.com/koron-go/_skeleton/.github/workflows/go.yml