Skip to content

Commit 93f85d2

Browse files
authored
[autobuilder.yml] Get VERSION in workflow to prepare for gh release.
1 parent 3d34537 commit 93f85d2

1 file changed

Lines changed: 27 additions & 2 deletions

File tree

.github/workflows/autobuilder.yml

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
strategy:
88
matrix:
99
os: ['ubuntu-24.04', 'ubuntu-24.04-arm']
10+
outputs:
11+
version: ${{ steps.extract.outputs.version }}
1012
steps:
1113
- name: Checkout repository
1214
uses: actions/checkout@v4
@@ -15,18 +17,41 @@ jobs:
1517
cd .devel
1618
chmod +x build_container.sh && ./build_container.sh sas_deb_builder
1719
- name: Extract debian files
20+
id: extract
1821
run: |
1922
cd .devel
2023
chmod +x extract_debian_from_container.sh && ./extract_debian_from_container.sh
24+
cd ~/extract
25+
cat SAS_VERSION >> "$GITHUB_OUTPUT"
2126
- name: Upload
2227
uses: actions/upload-artifact@v4
2328
with:
2429
name: debian-packages-${{ matrix.os }}
2530
path: .devel/upload/*
2631

27-
build_ppa:
32+
gh_release:
2833
needs: debian_builder
34+
name: Create Release on GitHub
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/download-artifact@v4 # Download all artifacts
38+
with:
39+
path: release/
40+
merge-multiple: true
41+
- name: Create release
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
run: |
45+
cd release
46+
cp extract/* .
47+
rm -rf extract
48+
gh release create "$tag" \
49+
--repo="$GITHUB_REPOSITORY" \
50+
--title="${GITHUB_REPOSITORY#*/} ${tag#v}" \
51+
--generate-notes
2952
53+
build_ppa:
54+
needs: debian_builder
3055
runs-on: ubuntu-latest
3156
steps:
3257
- uses: actions/download-artifact@v4 # Download all artifacts
@@ -98,4 +123,4 @@ jobs:
98123
platforms: linux/amd64,linux/arm64
99124
push: true
100125
file: .devel/sas_ros_jazzy/Dockerfile
101-
tags: ${{ vars.DOCKER_USERNAME }}/sas_ros_jazzy
126+
tags: ${{ vars.DOCKER_USERNAME }}/sas_ros_jazzy

0 commit comments

Comments
 (0)