robot_failover: add release workflow #1
Workflow file for this run
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 pex & deb for release | ||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: | ||
- 'v*' | ||
jobs: | ||
refresh: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
# pulls all commits (needed for lerna / semantic release to correctly version) | ||
fetch-depth: "0" | ||
# pulls all tags (needed for lerna / semantic release to correctly version) | ||
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- uses: cachix/install-nix-action@v22 | ||
with: | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
- run: nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs | ||
- run: nix-channel --update | ||
- run: ./pex.sh | ||
- run: ./deb.sh | ||
- name: Store pex | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pex | ||
path: robot_failover.pex | ||
- name: Store deb | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: deb | ||
path: robot_failover.deb | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: v${{ steps.cversion.outputs.version }} | ||
release_name: Release v${{ steps.cversion.outputs.version }} | ||
body: | | ||
Install from mgit dpkg repo once released there | ||
draft: false | ||
prerelease: false | ||
- name: Upload Release Asset .deb | ||
id: upload-release-asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: robot_failover.deb | ||
asset_name: robot-failover-${{ steps.cversion.outputs.version }}.deb | ||
asset_content_type: application/vnd.debian.binary-package | ||
- name: Upload Release Asset .pex | ||
id: upload-release-asset | ||
Check failure on line 62 in .github/workflows/release.yml GitHub Actions / Build pex & deb for releaseInvalid workflow file
|
||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: robot_failover.pex | ||
asset_name: robot-failover-${{ steps.cversion.outputs.version }}.pex | ||
asset_content_type: application/zip |