-
-
Notifications
You must be signed in to change notification settings - Fork 4
76 lines (75 loc) · 2.31 KB
/
sublime-package.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
67
68
69
70
71
72
73
74
75
76
name: Sublime Package
on:
release:
types: [published]
jobs:
autopackage:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2
with:
persist-credentials: false
path: current-repo
fetch-depth: 0
submodules: recursive
- name: Configure git # run the run.py to get the latest data
working-directory: ./current-repo
run: |
git config --global user.email "[email protected]"
git config --global user.name "Automatic packaging"
- name: Prepare sublime release
working-directory: ./current-repo
run: |
TAGNAME=$(git describe --tags --abbrev=0)
cp -r *.md ..
cp -r src ..
git branch -d package-control-release || echo "No existing branch"
git checkout --orphan package-control-release
git rm --cached -r .
mkdir ../deleted
mv * ../deleted/
ls
cp -r ../*.md .
ls
cp -r ../src/. ./
ls
git add .
git clone https://github.com/joaotavora/sly.git
rm -rf sly/.git
git add sly/
git commit -m "Create Sublime release for $TAGNAME"
git tag "ST-$TAGNAME"
git tag
- name: Push sublime release
uses: actions-js/[email protected]
with:
directory: current-repo
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
tags: true
empty: true
branch: package-control-release
- name: Install `zip` command # run the run.py to get the latest data
run: |
sudo apt-get install zip
- name: Prepare files for ZIPping
working-directory: ./current-repo
run: |
rm -rf .git
rm -rf .github
rm -rf .gitignore
- name: ZIP files together
run: |
mv current-repo slyblime
zip -r slyblime slyblime/
- name: Upload ZIPped package to release
uses: svenstaro/[email protected]
with:
file: slyblime.zip
tag: ${{ github.ref }}
repo_token: ${{ secrets.GITHUB_TOKEN }}
overwrite: true
asset_name: slyblime-$tag.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}