forked from tt-rss/tt-rss
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (88 loc) · 2.84 KB
/
Copy pathrelease.yml
File metadata and controls
105 lines (88 loc) · 2.84 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Release
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
env:
NODE_OPTIONS: "--max-old-space-size=4096"
jobs:
build:
name: Build Assets
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Ensure zip available
run: |
if ! command -v zip >/dev/null 2>&1; then
sudo apt-get update && sudo apt-get install -y zip
fi
- name: Create tar.gz
run: tar --exclude='.git' --exclude='.github' -czf tt-rss.tar.gz .
- name: Create zip
run: zip -r tt-rss.zip . -x '.git/*' -x '.github/*'
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: tt-rss-assets
path: |
tt-rss.tar.gz
tt-rss.zip
retention-days: 1
compression-level: 6
overwrite: true
release:
name: Release
runs-on: ubuntu-latest
needs: build
if: github.repository_owner == 'ashcoft'
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: '24'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Download artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: tt-rss-assets
path: .
- name: Verify artifacts
run: |
echo "=== Artifacts ==="
ls -la tt-rss.*
- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_AUTHOR_NAME: github-actions[bot]
GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com
GIT_COMMITTER_NAME: github-actions[bot]
GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com
- name: Upload artifacts to release
run: |
TAG=$(git describe --tags --abbrev=0)
echo "Uploading release assets for: $TAG"
gh release upload "$TAG" tt-rss.tar.gz --clobber
gh release upload "$TAG" tt-rss.zip --clobber
echo "=== Uploaded ==="
gh release view "$TAG" --json assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}