Skip to content

Commit

Permalink
Publish artifacts to AWS
Browse files Browse the repository at this point in the history
  • Loading branch information
mochaaP committed Jul 22, 2023
1 parent 4255a7b commit bb7cbe3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/Publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,6 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.AWS_DEFAULT_REGION }}
9 changes: 6 additions & 3 deletions publish.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ git add .

$shouldUpdate = git status -s
if ($shouldUpdate) {
git commit -m "Publish"
git remote set-url origin "https://tadaf:$token@github.com/bs-community/plugins-dist.git"
git push origin master
if ($env:AWS_ACCESS_KEY_ID -and $env:AWS_SECRET_ACCESS_KEY -and $env:AWS_DEFAULT_REGION) {
aws s3 sync . s3://plugins-dist/ --exclude ".git/*"
}
git commit -m "Publish"
git remote set-url origin "https://tadaf:$token@github.com/bs-community/plugins-dist.git"
git push origin master
}

Set-Location '..'
Expand Down

0 comments on commit bb7cbe3

Please sign in to comment.