testing #4
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 and Release | |
on: | |
push: | |
tags: | |
- 'v*.*.*' # This will run the workflow on every tag push with versioning format vX.X.X | |
workflow_dispatch: # Allows manually triggering the workflow | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install Nix | |
uses: cachix/install-nix-action@v27 | |
with: | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build docker packages | |
run: | | |
nix build .#docker.x86_64-linux.default | |
cp result docker-x86_64-linux | |
- name: Build other packages | |
run: | | |
nix build .#packages.x86_64-linux.default | |
cp result/bin/FOOdBAR package-x86_64-linux | |
- name: Upload docker x86_64-linux artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: docker-x86_64-linux | |
path: ./docker-x86_64-linux | |
- name: Upload package x86_64-linux artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: package-x86_64-linux | |
path: ./package-x86_64-linux | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Download docker x86_64-linux artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: docker-x86_64-linux | |
path: ./docker-x86_64-linux | |
- name: Download package x86_64-linux artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: package-x86_64-linux | |
path: ./package-x86_64-linux | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: Release ${{ github.ref }} | |
draft: false | |
prerelease: false | |
- name: Upload docker x86_64-linux to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./docker-x86_64-linux | |
asset_name: docker-x86_64-linux | |
asset_content_type: application/octet-stream | |
- name: Upload package x86_64-linux to release | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./package-x86_64-linux | |
asset_name: package-x86_64-linux | |
asset_content_type: application/octet-stream |