workflow patch build.sh #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Adapters | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-button-toggle-adapter: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run build script for Button Toggle Adapter | |
run: | | |
cd button-toggle-adapter | |
./create-adapter-zip.sh | |
working-directory: ${{ github.workspace }} | |
- name: Set release tag for Button Toggle Adapter | |
id: button-toggle-vars | |
run: echo "::set-output name=release_tag::button-toggle-release-$(date +'%Y-%m-%d-%H%M%S')" | |
- name: Create Release for Button Toggle Adapter | |
id: button-toggle-create-release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ steps.button-toggle-vars.outputs.release_tag }} | |
release_name: Release ${{ steps.button-toggle-vars.outputs.release_tag }} | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.ADAPTER_GITHUB_TOKEN }} | |
- name: Upload Release Asset for Button Toggle Adapter | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.button-toggle-create-release.outputs.upload_url }} | |
asset_path: ${{ github.workspace }}/button-toggle-adapter/adapter.zip | |
asset_name: button_toggle_adapter.zip | |
asset_content_type: application/zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.ADAPTER_GITHUB_TOKEN }} | |
build-zmq-adapter: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Run build script for ZMQ Adapter | |
run: | | |
cd zmq_adapter | |
./build.sh | |
working-directory: ${{ github.workspace }} | |
- name: Set release tag for ZMQ Adapter | |
id: zmq-vars | |
run: echo "::set-output name=release_tag::zmq-release-$(date +'%Y-%m-%d-%H%M%S')" | |
- name: Create Release for ZMQ Adapter | |
id: zmq-create-release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: ${{ steps.zmq-vars.outputs.release_tag }} | |
release_name: Release ${{ steps.zmq-vars.outputs.release_tag }} | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.ADAPTER_GITHUB_TOKEN }} | |
- name: Upload Release Asset for ZMQ Adapter | |
uses: actions/upload-release-asset@v1 | |
with: | |
upload_url: ${{ steps.zmq-create-release.outputs.upload_url }} | |
asset_path: ${{ github.workspace }}/zmq_adapter/zmq_adapter.zip | |
asset_name: zmq_adapter.zip | |
asset_content_type: application/zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.ADAPTER_GITHUB_TOKEN }} |