bottom/.github/workflows/deploy.yml

47 lines
1.9 KiB
YAML
Raw Normal View History

2020-08-19 14:27:57 +00:00
name: Update Packages
on:
workflow_dispatch:
2020-08-24 06:15:25 +00:00
inputs:
tags:
description: "Test scenario tags"
2020-08-19 14:27:57 +00:00
release:
types: [published]
jobs:
2020-08-24 06:09:52 +00:00
deploy:
2020-08-19 14:27:57 +00:00
runs-on: ubuntu-latest
steps:
2020-08-24 06:02:51 +00:00
- uses: actions/checkout@v2
2020-08-19 14:27:57 +00:00
- name: Set env
2020-08-19 14:40:58 +00:00
run: echo ::set-env name=RELEASE_VERSION::${GITHUB_REF#refs/*/}
2020-08-19 14:27:57 +00:00
- name: Test env
run: |
echo $RELEASE_VERSION
- name: Download packages
run: |
curl -LO "https://github.com/ClementTsang/bottom/releases/download/$RELEASE_VERSION/bottom_x86_64-unknown-linux-gnu.tar.gz";
curl -LO "https://github.com/ClementTsang/bottom/releases/download/$RELEASE_VERSION/bottom_x86_64-apple-darwin.tar.gz";
- name: Execute packaging script
run: |
python "./deployment/packager.py" $RELEASE_VERSION "./deployment/macos/homebrew/bottom.rb.template" "./bottom.rb" "SHA256" "./bottom_x86_64-apple-darwin.tar.gz" "./bottom_x86_64-unknown-linux-gnu.tar.gz";
- name: Upload bottom.rb to release
uses: svenstaro/upload-release-action@2.1.0
with:
repo_token: ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }}
file: bottom.rb
2020-08-24 06:22:33 +00:00
tag: ${{ env.RELEASE_VERSION }}
overwrite: true
2020-08-19 14:27:57 +00:00
- name: Trigger homebrew
run: |
curl -X POST https://api.github.com/repos/ClementTsang/homebrew-bottom/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \
2020-08-24 06:22:33 +00:00
--data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }'
2020-08-19 14:27:57 +00:00
- name: Trigger choco
run: |
curl -X POST https://api.github.com/repos/ClementTsang/choco-bottom/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \
2020-08-24 06:22:33 +00:00
--data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }'