Compare commits
1 Commits
38653c6ab5
...
81163cc60f
Author | SHA1 | Date | |
---|---|---|---|
81163cc60f |
@ -1,4 +1,4 @@
|
|||||||
name: Create distribution
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -41,13 +41,21 @@ jobs:
|
|||||||
run: >-
|
run: >-
|
||||||
go generate ./...
|
go generate ./...
|
||||||
|
|
||||||
- name: Build for release
|
- name: Build for Linux
|
||||||
run: FORTIFY_VERSION='${{ github.ref_name }}' ./dist/release.sh
|
run: >-
|
||||||
|
go build -v -ldflags '-s -w
|
||||||
|
-X git.ophivana.moe/security/fortify/internal.Version=${{ github.ref_name }}
|
||||||
|
-X git.ophivana.moe/security/fortify/internal.Fsu=/usr/bin/fsu
|
||||||
|
-X git.ophivana.moe/security/fortify/internal.Finit=/usr/libexec/fortify/finit
|
||||||
|
-X main.Fmain=/usr/bin/fortify
|
||||||
|
-X main.Fshim=/usr/libexec/fortify/fshim'
|
||||||
|
-o bin/ ./... &&
|
||||||
|
(cd bin && sha512sum --tag -b * > sha512sums)
|
||||||
|
|
||||||
- name: Release
|
- name: Release
|
||||||
id: use-go-action
|
id: use-go-action
|
||||||
uses: https://gitea.com/actions/release-action@main
|
uses: https://gitea.com/actions/release-action@main
|
||||||
with:
|
with:
|
||||||
files: |-
|
files: |-
|
||||||
dist/fortify-**
|
bin/**
|
||||||
api_key: '${{secrets.RELEASE_TOKEN}}'
|
api_key: '${{secrets.RELEASE_TOKEN}}'
|
||||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -26,6 +26,3 @@ go.work.sum
|
|||||||
|
|
||||||
# go generate
|
# go generate
|
||||||
security-context-v1-protocol.*
|
security-context-v1-protocol.*
|
||||||
|
|
||||||
# release
|
|
||||||
/dist/fortify-*
|
|
1
dist/fsurc.default
vendored
1
dist/fsurc.default
vendored
@ -1 +0,0 @@
|
|||||||
1000 0
|
|
10
dist/install.sh
vendored
10
dist/install.sh
vendored
@ -1,10 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cd "$(dirname -- "$0")" || exit 1
|
|
||||||
|
|
||||||
install -vDm0755 "bin/fortify" "${FORTIFY_INSTALL_PREFIX}/usr/bin/fortify"
|
|
||||||
install -vDm0755 "bin/fshim" "${FORTIFY_INSTALL_PREFIX}/usr/libexec/fortify/fshim"
|
|
||||||
install -vDm0755 "bin/finit" "${FORTIFY_INSTALL_PREFIX}/usr/libexec/fortify/finit"
|
|
||||||
install -vDm0755 "bin/fuserdb" "${FORTIFY_INSTALL_PREFIX}/usr/libexec/fortify/fuserdb"
|
|
||||||
|
|
||||||
install -vDm6511 "bin/fsu" "${FORTIFY_INSTALL_PREFIX}/usr/bin/fsu"
|
|
||||||
install -vDm0400 "fsurc.default" "${FORTIFY_INSTALL_PREFIX}/etc/fsurc"
|
|
19
dist/release.sh
vendored
19
dist/release.sh
vendored
@ -1,19 +0,0 @@
|
|||||||
#!/bin/sh -e
|
|
||||||
cd "$(dirname -- "$0")/.."
|
|
||||||
VERSION="${FORTIFY_VERSION:-untagged}"
|
|
||||||
pname="fortify-${VERSION}"
|
|
||||||
out="dist/${pname}"
|
|
||||||
|
|
||||||
mkdir -p "${out}"
|
|
||||||
cp "README.md" "dist/fsurc.default" "dist/install.sh" "${out}"
|
|
||||||
|
|
||||||
go build -v -o "${out}/bin/" -ldflags "-s -w
|
|
||||||
-X git.ophivana.moe/security/fortify/internal.Version=${VERSION}
|
|
||||||
-X git.ophivana.moe/security/fortify/internal.Fsu=/usr/bin/fsu
|
|
||||||
-X git.ophivana.moe/security/fortify/internal.Finit=/usr/libexec/fortify/finit
|
|
||||||
-X main.Fmain=/usr/bin/fortify
|
|
||||||
-X main.Fshim=/usr/libexec/fortify/fshim" ./...
|
|
||||||
|
|
||||||
rm -f "./${out}.tar.gz" && tar -C dist -czf "${out}.tar.gz" "${pname}"
|
|
||||||
rm -rf "./${out}"
|
|
||||||
sha512sum "${out}.tar.gz" > "${out}.tar.gz.sha512"
|
|
Loading…
Reference in New Issue
Block a user