Skip to content

Commit ed0f7f7

Browse files
authored
Merge pull request #1 from NickChecan/pipeline
Test, Build and Deploy
2 parents 7bae5a3 + 77fd12d commit ed0f7f7

File tree

4 files changed

+147
-0
lines changed

4 files changed

+147
-0
lines changed

.github/workflows/pipeline.yaml

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
name: Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
unit-test:
11+
name: Unit Test
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
18+
- name: Run unit tests
19+
run: make unit-test
20+
21+
smoke-test:
22+
name: Smoke Test
23+
runs-on: ubuntu-latest
24+
25+
steps:
26+
- name: Check out repository
27+
uses: actions/checkout@v4
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.13"
33+
34+
- name: Run smoke tests
35+
run: make smoke-test
36+
37+
package-buildpack:
38+
name: Package Buildpack
39+
runs-on: ubuntu-latest
40+
needs:
41+
- unit-test
42+
- smoke-test
43+
44+
steps:
45+
- name: Check out repository
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
50+
- name: Set up Go
51+
uses: actions/setup-go@v5
52+
with:
53+
go-version: "1.22"
54+
55+
- name: Install buildpack-packager
56+
run: go install github.com/cloudfoundry/libbuildpack/packager/buildpack-packager@latest
57+
58+
- name: Package buildpack
59+
run: buildpack-packager build -cached -any-stack
60+
61+
release-buildpack:
62+
name: Release Buildpack
63+
runs-on: ubuntu-latest
64+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
65+
needs:
66+
- package-buildpack
67+
permissions:
68+
contents: write
69+
issues: write
70+
pull-requests: write
71+
72+
steps:
73+
- name: Check out repository
74+
uses: actions/checkout@v4
75+
with:
76+
fetch-depth: 0
77+
78+
- name: Set up Go
79+
uses: actions/setup-go@v5
80+
with:
81+
go-version: "1.22"
82+
83+
- name: Install buildpack-packager
84+
run: go install github.com/cloudfoundry/libbuildpack/packager/buildpack-packager@latest
85+
86+
- name: Set up Node.js
87+
uses: actions/setup-node@v4
88+
with:
89+
node-version: "22"
90+
91+
- name: Install semantic-release
92+
run: npm install --no-save semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/github @semantic-release/exec conventional-changelog-conventionalcommits
93+
94+
- name: Publish semantic release
95+
env:
96+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
run: npx semantic-release

.releaserc.json

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"branches": [
3+
"main"
4+
],
5+
"tagFormat": "v${version}",
6+
"plugins": [
7+
[
8+
"@semantic-release/commit-analyzer",
9+
{
10+
"preset": "conventionalcommits"
11+
}
12+
],
13+
[
14+
"@semantic-release/release-notes-generator",
15+
{
16+
"preset": "conventionalcommits"
17+
}
18+
],
19+
[
20+
"@semantic-release/exec",
21+
{
22+
"prepareCmd": "printf '%s\\n' <%= nextRelease.version %> > VERSION && buildpack-packager build -cached -any-stack"
23+
}
24+
],
25+
[
26+
"@semantic-release/github",
27+
{
28+
"assets": [
29+
{
30+
"path": "*.zip",
31+
"label": "Packaged buildpack"
32+
}
33+
]
34+
}
35+
]
36+
]
37+
}

VERSION

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.0

manifest.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
language: python-uv
3+
default_versions: []
4+
dependency_deprecation_dates: []
5+
dependencies: []
6+
7+
include_files:
8+
- VERSION
9+
- bin/compile
10+
- bin/detect
11+
- bin/release
12+
- manifest.yml

0 commit comments

Comments
 (0)