-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.17 KB
/
Copy pathrelease.yml
File metadata and controls
34 lines (32 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
name: Build & publish module to the Tiny Systems
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v5
with:
go-version: '>=1.23.1'
- run: |
echo "Preparing a release"
echo "Module name ${{ github.event.repository.name }}"
# Remove local replace directives (used for local dev only)
sed -i '/replace github.com\/tiny-systems\/module =>/d' go.mod
go mod tidy
go test ./...
go run cmd/main.go tools build --version ${{github.ref_name}} --name github.com/${{ github.repository }} --devkey ${{secrets.TINY_DEV_SECRET}}
- name: Notify e2e
if: success()
env:
MODULE_NAME: ${{ github.event.repository.name }}
MODULE_VERSION: ${{ github.ref_name }}
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.E2E_DISPATCH_TOKEN }}
repository: tiny-systems/e2e
event-type: module-released
client-payload: '{"module":"${{ env.MODULE_NAME }}","version":"${{ env.MODULE_VERSION }}"}'