Skip to content

Commit b92b415

Browse files
committed
workflow
1 parent ced48de commit b92b415

File tree

1 file changed

+4
-38
lines changed

1 file changed

+4
-38
lines changed

.github/workflows/release.yml

+4-38
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Create Release with Binary
22

33
on:
4-
tags:
5-
- '*'
4+
push:
5+
branches: [ "master" ]
66

77
jobs:
88
release:
@@ -11,26 +11,19 @@ jobs:
1111
- name: Checkout repository
1212
uses: actions/checkout@v4
1313

14-
- name: Get version from config.make
15-
id: get_version
16-
run: |
17-
VERSION=$(sed -ne 's/^VERSION := //p' config.make | tr -d '\n')
18-
echo "::set-output name=version::$VERSION"
19-
2014
- name: Download Binary using wget
2115
run: |
2216
wget https://github.com/michael105/static-bin/raw/refs/heads/main/xorg/slterm
2317
chmod a+x slterm
2418
mv slterm slterm_linux_amd64
25-
2619
- name: Create GitHub Release
2720
id: create_release
2821
uses: actions/create-release@v1
2922
env:
3023
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3124
with:
32-
tag_name: ${{ steps.get_version.outputs.version }}
33-
release_name: Release ${{ steps.get_version.outputs.version }}
25+
tag_name: ${{ github.ref }}
26+
release_name: Release ${{ github.ref }}
3427
body: |
3528
statically linked binary for linux/64bit attached
3629
draft: false
@@ -45,30 +38,3 @@ jobs:
4538
asset_path: ./slterm_linux_amd64
4639
asset_name: slterm_linux_amd64
4740
asset_content_type: application/octet-stream
48-
49-
- name: build package
50-
run: |
51-
VERSION=${{ steps.get_version.outputs.version }}
52-
sed -i "s/VERSION/$VERSION/;/^Depends:/d" dist/debian/DEBIAN/control
53-
cat dist/debian/DEBIAN/control
54-
mkdir -p dist/debian/usr/local/bin
55-
cp slterm_linux_amd64 dist/debian/usr/local/bin/slterm
56-
mkdir -p dist/debian/usr/local/share/man/man1
57-
cp src/slterm.1 dist/debian/usr/local/share/man/man1/
58-
mkdir -p dist/debian/usr/local/share/doc/slterm
59-
cp -R README.md LICENSE PATCHES.md doc test dist/debian/usr/local/share/doc/slterm/
60-
dpkg-deb --build dist/debian slterm_$VERSION.deb
61-
62-
- name: upload package
63-
uses: actions/upload-release-asset@v1
64-
env:
65-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66-
with:
67-
upload_url: ${{ steps.create_release.outputs.upload_url }}
68-
asset_path: slterm_${{ steps.get_version.outputs.version }}.deb
69-
asset_name: slterm_${{ steps.get_version.outputs.version }}.deb
70-
asset_content_type: application/vnd.debian.binary-package
71-
72-
73-
74-

0 commit comments

Comments
 (0)