mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 18:11:35 +00:00
Merge pull request #3835 from dgageot/release-workflow
Add an automated release workflow
This commit is contained in:
commit
e25cc72531
42
.github/workflows/release.yml
vendored
Normal file
42
.github/workflows/release.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: LinuxKit CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
create:
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build all targets
|
||||||
|
runs-on: macos-latest
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Set up Go 1.16
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.16.7
|
||||||
|
id: go
|
||||||
|
|
||||||
|
- name: Check out code
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
path: ./src/github.com/linuxkit/linuxkit
|
||||||
|
|
||||||
|
- name: Set path
|
||||||
|
run: echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
|
||||||
|
env:
|
||||||
|
GOPATH: ${{runner.workspace}}
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
make build-all-targets
|
||||||
|
env:
|
||||||
|
GOPATH: ${{runner.workspace}}
|
||||||
|
|
||||||
|
- name: GitHub Release
|
||||||
|
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
draft: true
|
||||||
|
files: bin/*
|
16
Makefile
16
Makefile
@ -117,3 +117,19 @@ endif
|
|||||||
for img in $(tags); do \
|
for img in $(tags); do \
|
||||||
./scripts/update-component-sha.sh --image $${img}$(image); \
|
./scripts/update-component-sha.sh --image $${img}$(image); \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
.PHONY: build-all-targets
|
||||||
|
build-all-targets: bin
|
||||||
|
$(MAKE) GOOS=darwin GOARCH=arm64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-darwin-arm64 local-build
|
||||||
|
file bin/linuxkit-darwin-arm64
|
||||||
|
$(MAKE) GOOS=darwin GOARCH=amd64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-darwin-amd64 local-build
|
||||||
|
file bin/linuxkit-darwin-amd64
|
||||||
|
$(MAKE) GOOS=linux GOARCH=arm64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-linux-arm64 local-build
|
||||||
|
file bin/linuxkit-linux-arm64
|
||||||
|
$(MAKE) GOOS=linux GOARCH=amd64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-linux-amd64 local-build
|
||||||
|
file bin/linuxkit-linux-amd64
|
||||||
|
$(MAKE) GOOS=linux GOARCH=s390x LOCAL_TARGET=$(CURDIR)/bin/linuxkit-linux-s390x local-build
|
||||||
|
file bin/linuxkit-linux-s390x
|
||||||
|
$(MAKE) GOOS=windows GOARCH=amd64 LOCAL_TARGET=$(CURDIR)/bin/linuxkit-windows-amd64.exe local-build
|
||||||
|
file bin/linuxkit-windows-amd64.exe
|
||||||
|
cd bin && openssl sha256 -r linuxkit-* | tr -d '*' > checksums.txt
|
||||||
|
Loading…
Reference in New Issue
Block a user