Skip to content

Commit 0dbf9b3

Browse files
authored
Update sync_data_release.yml
1 parent 7d4090d commit 0dbf9b3

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,31 @@
11
name: Sync Data Assets to Release with Pseudo-Pastas
22

3+
# Dispara o workflow quando qualquer arquivo dentro da pasta data muda na branch main
34
on:
45
push:
56
branches:
67
- main
78
paths:
8-
- 'data/**' # dispara quando qualquer arquivo dentro de data muda
9+
- 'data/**'
910

1011
jobs:
1112
update-release:
1213
runs-on: ubuntu-latest
1314
env:
14-
GITHUB_TOKEN: ${{ secrets.MY_PAT }} # <- Aqui você coloca seu PAT
15+
GITHUB_TOKEN: ${{ secrets.MY_PAT }} # <- Use aqui seu PAT criado como secret
1516
steps:
1617
# 1️⃣ Clona o repositório
1718
- name: Checkout repository
1819
uses: actions/checkout@v3
1920

20-
# 2️⃣ Cria ou atualiza Release
21+
# 2️⃣ Cria ou atualiza a Release
2122
- name: Create or update Release
2223
id: release
2324
uses: softprops/action-gh-release@v1
2425
with:
25-
tag_name: v1.0 # Release fixa que será atualizada
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
tag_name: v1.0 # Substitua se quiser outra tag
2827

29-
# 3️⃣ Upload de todos os arquivos mantendo pseudo-pastas
28+
# 3️⃣ Upload de todos os arquivos dentro da pasta data mantendo pseudo-pastas
3029
- name: Upload all data files
3130
run: |
3231
shopt -s globstar
@@ -38,5 +37,4 @@ jobs:
3837
gh release upload "v1.0" "$file" --clobber --name "$asset_name"
3938
fi
4039
done
41-
env:
42-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+

0 commit comments

Comments
 (0)