-
Notifications
You must be signed in to change notification settings - Fork 3
79 lines (68 loc) · 2.89 KB
/
release.yml
File metadata and controls
79 lines (68 loc) · 2.89 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
on:
push:
branches:
- main
- surface
name: Release Box
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Main Repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: main
- name: Get Env
run: |
echo "REPO_NAME=${{ github.repository }}" >> $GITHUB_ENV
echo "REPO_BASENAME=$(basename ${{ github.repository }})" >> $GITHUB_ENV
- name: New tag
id: new-tag
run: |
set -euo pipefail
# Compute the next semver patch from the repo's latest release.
# jq is preinstalled on ubuntu-latest runners.
LATEST_TAG=$(curl -fsSL "https://api.github.com/repos/${{ env.REPO_NAME }}/releases/latest" | jq -r '.tag_name' | sed 's/^v//')
TAG_1=$(echo "$LATEST_TAG" | cut -d. -f1)
TAG_2=$(echo "$LATEST_TAG" | cut -d. -f2)
TAG_3=$(echo "$LATEST_TAG" | cut -d. -f3)
TAG="${TAG_1}.${TAG_2}.$((TAG_3 + 1))"
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
- name: Create GitHub Release
id: create_release
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
with:
tag: ${{ steps.new-tag.outputs.tag }}
name: ${{ env.REPO_BASENAME }} ${{ steps.new-tag.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
commit: "main"
prerelease: false
draft: false
- name: Tar gz Main
run: |
tar -czf InterAACtionBox-main.tar.gz ./ISOScripts/ ./Libs/ ./Ressources/ ./Scripts/ ./slides/
- name: Upload Main to Release
id: upload-main-assets
uses: csexton/release-asset-action@73f9d3bb8efa2547046ae5130a5c4597e983d543 # v2
with:
release-url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`.
files: |
InterAACtionBox-main.tar.gz
install.sh
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout Surface Repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
ref: surface
- name: Tar gz Surface
run: |
tar -czf InterAACtionBox-surface.tar.gz ./ISOScripts/ ./Libs/ ./Ressources/ ./Scripts/ ./slides/
- name: Upload Surface to Release
id: upload-surface-assets
uses: csexton/release-asset-action@73f9d3bb8efa2547046ae5130a5c4597e983d543 # v2
with:
release-url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`.
files: |
InterAACtionBox-surface.tar.gz
install_surface.sh
github-token: ${{ secrets.GITHUB_TOKEN }}