Skip to content

Fix n to use LTS in case auto cannot detect a version #407

Fix n to use LTS in case auto cannot detect a version

Fix n to use LTS in case auto cannot detect a version #407

Workflow file for this run

name: CI
on: [push]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
# do not enable cache here, because golangci-linter
# has its own internal cache with better performance
go-version: 1.20.x
- name: Run linter
uses: golangci/golangci-lint-action@v3
with:
version: v1.52
- name: Run tests
run: make test
build:
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: build --snapshot --clean
workdir: .
- name: Upload assets
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: platformify
path: ./dist/*
retention-days: 14
build-upsun:
needs: test
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: 1.20.x
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: build --config=.goreleaser.upsun.yaml --snapshot --clean
workdir: .
- name: Upload assets
if: github.ref == 'refs/heads/main'
uses: actions/upload-artifact@v3
with:
name: upsunify
path: ./dist/*
retention-days: 7