Skip to content

Commit ee665d5

Browse files
ci: setup go releaser
- Add push tag workflow - setup goreleaser config - npm commands to running changeset release
1 parent 46c12eb commit ee665d5

File tree

4 files changed

+1003
-0
lines changed

4 files changed

+1003
-0
lines changed
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: push-tag-release
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
ci-lint:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
14+
contents: read
15+
actions: read
16+
steps:
17+
- name: Linting Go
18+
uses: smartcontractkit/.github/actions/ci-lint-go@eeb76b5870e3c17856d5a60fd064a053c023b5f5 # ci-lint-go@1.0.0
19+
with:
20+
golangci-lint-version: v2.0.2
21+
# Override the lint args because the detault ones are not compatible with golangci-lint v2
22+
golangci-lint-args: --output.checkstyle.path=golangci-lint-report.xml
23+
24+
ci-test:
25+
runs-on: ubuntu-latest
26+
permissions:
27+
id-token: write
28+
contents: read
29+
actions: read
30+
steps:
31+
- name: ci-test
32+
uses: smartcontractkit/.github/actions/ci-test-go@eeb76b5870e3c17856d5a60fd064a053c023b5f5 # ci-test-go@1.0.0
33+
34+
cicd-publish-release:
35+
runs-on: ubuntu-latest
36+
permissions:
37+
id-token: write
38+
contents: write
39+
actions: read
40+
steps:
41+
- name: cicd-publish-release
42+
uses: smartcontractkit/.github/actions/cicd-build-publish-artifacts-go@b4737861584f88fa9569d6978f70fedf8b1ae67c # cicd-build-publish-artifacts-go@0.4.0
43+
with:
44+
# general inputs
45+
app-name: chainlink-deployments-framework
46+
publish: "false" # do not publish docker image to ECR
47+
update-git-tag: "true"
48+
# goreleaser inputs
49+
goreleaser-args: "--config .goreleaser.yml"
50+
goreleaser-version: '~> v2'
51+
goreleaser-dist: goreleaser-pro
52+
goreleaser-key: ${{ secrets.GORELEASER_KEY }}
53+
54+
# todo: enable once i have the secret setup (pending security ticket)
55+
# - name: Set tag for Slack notification
56+
# run: echo "TAG=${{ github.ref_name }}" >> "$GITHUB_ENV"
57+
# shell: bash
58+
#
59+
# - name: Notify Slack
60+
# uses: smartcontractkit/.github/actions/slack-notify-git-ref@eeb76b5870e3c17856d5a60fd064a053c023b5f5 # slack-notify-git-ref@1.0.0
61+
# with:
62+
# slack-channel-id: ${{ secrets.SLACK_CHANNEL_CLDF}}
63+
# slack-bot-token: ${{ secrets.SLACK_BOT_TOKEN_RELENG }} # Releng Bot
64+
# git-ref: ${{ env.TAG }}
65+
# git-ref-type: tag
66+
# changelog-url: 'https://github.com/${{ github.repository }}/releases/tag/${{ env.TAG }}'

.goreleaser.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Make sure to check the documentation at https://goreleaser.com
2+
version: 2
3+
project_name: chainlink-deployments-framework
4+
5+
builds:
6+
- skip: true
7+
8+
release:
9+
github:
10+
owner: smartcontractkit
11+
name: chainlink-deployments-framework
12+
prerelease: auto
13+
footer: |
14+
Check out the official changelog [here](https://github.com/smartcontractkit/chainlink-deployments-framework/blob/main/CHANGELOG.md)
15+
16+
checksum:
17+
name_template: checksums.txt
18+
19+
changelog:
20+
disable: true

package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "chainlink-deployments-framework",
3+
"version": "1.0.0",
4+
"description": "A deployment framework for chainlink-deployments ",
5+
"private": true,
6+
"scripts": {
7+
"ci:changeset:publish": "pnpm changeset publish",
8+
"ci:changeset:version": "pnpm changeset version && pnpm version --patch"
9+
},
10+
"author": "@smartcontractkit",
11+
"devDependencies": {
12+
"@changesets/changelog-github": "^0.5.0",
13+
"@changesets/cli": "~2.27.12",
14+
"changeset": "^0.2.6"
15+
},
16+
"repository": "https://github.com/smartcontractkit/chainlink-deployments-framework"
17+
}

0 commit comments

Comments
 (0)