-
Notifications
You must be signed in to change notification settings - Fork 4
46 lines (44 loc) · 1.16 KB
/
release.yml
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
35
36
37
38
39
40
41
42
43
44
45
46
name: Release
on:
push:
branches:
- main
permissions:
contents: write
packages: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Install earthly
uses: earthly/actions-setup@v1
with:
use-cache: true
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Tests and Package
run: earthly +pre-commit
env:
EARTHLY_SECRETS: "GITHUB_TOKEN=${{ secrets.NUMARY_GITHUB_TOKEN }}"
- name: Dirty
id: changed-files
shell: bash
run: |
hasChanged=$(git status --porcelain)
if (( $(echo ${#hasChanged}) != 0 )); then
git status
echo "There are changes in the repository"
exit 1
fi
- name: Release
run: earthly +release
env:
EARTHLY_SECRETS: "GITHUB_TOKEN=${{ secrets.NUMARY_GITHUB_TOKEN }}"