Skip to content

Commit

Permalink
Merge pull request #11 from datastack-net/feature/semantic-release-build
Browse files Browse the repository at this point in the history
Feature/semantic release build
  • Loading branch information
boukeversteegh authored Mar 20, 2022
2 parents 98aed10 + 3c73176 commit cd0687f
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 11 deletions.
40 changes: 38 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,52 @@ on:
push:
branches:
- master
- feature/semantic-release
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- { name: windows64, GOOS: windows, GOARCH: amd64, BIN: "dockerized.exe" }
steps:
- uses: actions/checkout@v2
- run: mkdir -p release/${{ matrix.target.name }}
- name: Copy static assets
run: cp -r apps/ .env *.md release/${{ matrix.target.name }}
- name: Build
env:
GOOS: "${{ matrix.target.GOOS }}"
BIN: "${{ matrix.target.BIN }}"
GO_VERSION: "1.17.8"
run: |
bin/dockerized go build -o release/${{ matrix.target.name }}/bin/$BIN lib/dockerized.go
- name: Zip
working-directory: release/${{ matrix.target.name }}
run: |
zip -r $GITHUB_WORKSPACE/release/${{ matrix.target.name }}.zip *
- uses: actions/upload-artifact@v2
with:
name: release
path: release/*.zip
release:
name: Release
runs-on: ubuntu-latest
needs:
- build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 16
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
with:
name: release
path: release
- name: Verify artifacts
run: |
ls -lah .
echo
tree
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ services:
go:
image: "golang:${GO_VERSION}"
entrypoint: [ "go" ]
volumes:
- "go_cache:/go/pkg"
environment:
GOOS: "${GOOS:-}"
helm:
image: "alpine/helm:${HELM_VERSION}"
http:
Expand Down Expand Up @@ -159,8 +163,18 @@ services:
yarn:
<<: *node
entrypoint: [ "yarn" ]
zip:
image: "zip"
build:
context: apps/alpine
args:
ALPINE_VERSION: "${ALPINE_VERSION}"
ALPINE_PACKAGES: "zip"
entrypoint: ["/usr/bin/zip"]

volumes:
node_modules: {}
python_modules: {}
pip_cache: {}
dockerized_compile: {}
go_cache: {}
21 changes: 12 additions & 9 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
module.exports = {
branches: ['master', 'feature/semantic-release'],
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
'@semantic-release/changelog',
'@semantic-release/github',
'@semantic-release/git',
],
branches: ['master'],
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/github", {
"assets": [
{"path": "release/windows64.zip", "label": "Windows (64bit)", "name": "dockerized-${nextRelease.gitTag}-win64.zip"},
]
}],
'@semantic-release/changelog',
'@semantic-release/git',
],
};

0 comments on commit cd0687f

Please sign in to comment.