Skip to content

Commit dfb67d1

Browse files
authored
Merge pull request #1 from akquinet/fix-cicd
fix: trying to add cicd
2 parents 20ce44d + 0195e8f commit dfb67d1

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "" # See documentation for possible values
9+
directory: "/" # Location of package manifests
10+
schedule:
11+
interval: "weekly"

.github/workflows/build.yaml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
on:
3+
push:
4+
branches:
5+
- "*"
6+
tags:
7+
- "v*.*.*"
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- uses: actions/setup-go@v2
16+
with:
17+
go-version: '1.20'
18+
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: '3.11'
22+
23+
- name: Setup
24+
run: make setup
25+
26+
- name: Run pre-commit
27+
run: make pre-commit-all
28+
env:
29+
SKIP: "no-commit-to-branch"
30+
31+
release-binary:
32+
runs-on: ubuntu-latest
33+
if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags') || github.ref == 'refs/heads/main')
34+
needs:
35+
- pre-commit
36+
steps:
37+
- name: Check out the repo
38+
uses: actions/checkout@v3
39+
40+
- name: Generate a token
41+
id: generate_token
42+
uses: actions/create-github-app-token@v1
43+
with:
44+
app-id: ${{ secrets.CICD_APP_ID }}
45+
private-key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
46+
47+
- name: Run GoReleaser
48+
uses: goreleaser/goreleaser-action@v4
49+
with:
50+
distribution: goreleaser
51+
version: latest
52+
args: release --rm-dist
53+
env:
54+
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"
55+
56+
semantic-release:
57+
runs-on: ubuntu-latest
58+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
59+
needs:
60+
- pre-commit
61+
steps:
62+
- name: Checkout
63+
uses: actions/checkout@v3
64+
with:
65+
persist-credentials: false
66+
67+
- name: Generate a token
68+
id: generate_token
69+
uses: actions/create-github-app-token@v1
70+
with:
71+
app-id: ${{ secrets.CICD_APP_ID }}
72+
private-key: ${{ secrets.CICD_APP_PRIVATE_KEY }}
73+
74+
- name: Semantic Release
75+
uses: cycjimmy/semantic-release-action@v3
76+
env:
77+
GITHUB_TOKEN: "${{ steps.generate_token.outputs.token }}"

0 commit comments

Comments
 (0)