Skip to content

Update dependency: deps/k_release (#348) #148

Update dependency: deps/k_release (#348)

Update dependency: deps/k_release (#348) #148

Workflow file for this run

name: 'Master Push'
on:
push:
branches:
- master
jobs:
nix-flake-release:
name: 'Nix flake release'
strategy:
matrix:
include:
- runner: ubuntu-latest
os: ubuntu-latest
- runner: macos-12
os: macos-12
- runner: MacM1
os: self-macos-12
runs-on: ${{ matrix.runner }}
steps:
- name: 'Check out code'
uses: actions/checkout@v3
- name: 'Upgrade bash'
if: ${{ contains(matrix.os, 'macos') }}
run: brew install bash
- name: 'Install Nix/Cachix'
if: ${{ !startsWith(matrix.os, 'self') }}
uses: cachix/install-nix-action@v22
with:
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- if: ${{ !startsWith(matrix.os, 'self') }}
uses: cachix/cachix-action@v12
with:
name: k-framework
authToken: ${{ secrets.CACHIX_PUBLIC_TOKEN }}
skipPush: true
- name: 'Build and cache kavm'
env:
GC_DONT_GC: 1
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_PUBLIC_TOKEN }}'
NIX_PATH: 'nixpkgs=http://nixos.org/channels/nixos-22.05/nixexprs.tar.xz'
run: |
export JQ=$(nix-build '<nixpkgs>' -A jq --no-link)/bin/jq
kavm=$(nix build .#kavm --json | $JQ -r '.[].outputs | to_entries[].value')
drv=$(nix-store --query --deriver ${kavm})
nix-store --query --requisites --include-outputs ${drv} | cachix push k-framework
tag-release:
name: 'Tag Release'
runs-on: ubuntu-latest
needs: nix-flake-release
steps:
- name: 'Check out code'
uses: actions/checkout@v3
with:
token: ${{ secrets.JENKINS_GITHUB_PAT }}
# fetch-depth 0 means deep clone the repo
fetch-depth: 0
- name: 'Update Version'
run: |
git config user.name devops
git config user.email [email protected]
version=v"$(cat package/version)"
git tag --delete "${version}" || true
git push --delete origin "${version}" || true
git tag "${version}" HEAD
git push origin "${version}:${version}"