-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (55 loc) · 1.91 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Create Latest Release
on:
push:
branches:
- main
permissions:
contents: write
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Read CHANGELOG
id: changelog
run: |
CHANGELOG=$(cat CHANGELOG.md)
echo "changelog<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create folder structure and ZIP file
run: |
# Create temporary directory
mkdir -p temp/Walmart-Invoice-Exporter
# Copy files to maintain structure
cp -r _locales temp/Walmart-Invoice-Exporter/
cp -r images temp/Walmart-Invoice-Exporter/
cp -r faq temp/Walmart-Invoice-Exporter/
cp background.js temp/Walmart-Invoice-Exporter/
cp content.js temp/Walmart-Invoice-Exporter/
cp exceljs.bare.min.js temp/Walmart-Invoice-Exporter/
cp manifest.json temp/Walmart-Invoice-Exporter/
cp popup.html temp/Walmart-Invoice-Exporter/
cp popup.js temp/Walmart-Invoice-Exporter/
cp popup.css temp/Walmart-Invoice-Exporter/
# Create ZIP from the temp directory
cd temp
zip -r ../Walmart-Invoice-Exporter.zip Walmart-Invoice-Exporter
cd ..
# Clean up
rm -rf temp
- name: Delete existing 'latest' release and tag
uses: dev-drprasad/[email protected]
with:
tag_name: latest
delete_release: true
github_token: ${{ github.token }}
- name: Create new release
uses: softprops/action-gh-release@v1
with:
files: Walmart-Invoice-Exporter.zip
tag_name: latest
name: Latest Release
body: ${{ env.changelog }}
token: ${{ github.token }}