[Chore] Fix autoreleasing CI job

Problem: After a recent switch to GitHub Actions, job that creates
prerelease suddenly stopped working.

Solution: Switch to the autoreleasing script from serokell.nix
which uses 'gh' instead of 'hub'.
This commit is contained in:
Roman Melnikov 2023-09-18 14:00:38 +02:00
parent 64a338b567
commit 8e4de7a50a
No known key found for this signature in database
GPG Key ID: 8931E8ED1EE2E537
4 changed files with 953 additions and 30 deletions

View File

@ -16,12 +16,13 @@ jobs:
- uses: actions/checkout@v3
- name: Create a pre-release
env:
OVERWRITE_RELEASE: true
# https://github.com/serokell/serokell.nix/blob/c1e2a33040438443c7721523e897db5e32a52a74/overlay/github.nix#L26
run: |
export GITHUB_TOKEN=${{ env.GITHUB_TOKEN }}
nix shell .#curl .#gitAndTools.hub -c bash -c "curl https://raw.githubusercontent.com/serokell/scratch/release-binary/scripts/release-binary.sh | bash"
nix run .#github.autorelease -- "$(nix-build ./release)" "Automatic release on "$(date +\"%Y%m%d%H%M\")""
- name: Push latest image to dockerhub
run: |
export DOCKERHUB_PASSWORD=${{ env.DOCKERHUB_PASSWORD }}
nix build -L .#docker-image
nix shell .#skopeo -c ./scripts/upload-docker-image.sh "docker-archive:$(readlink result)" "docker://docker.io/serokell/xrefcheck:latest"

File diff suppressed because it is too large Load Diff

View File

@ -60,7 +60,6 @@
apps.default = self.apps.${system}."x86_64-unknown-linux-musl:xrefcheck:exe:xrefcheck";
packages = {
default = self.packages.${system}.xrefcheck;
xrefcheck = self.packages.${system}."xrefcheck:exe:xrefcheck";

View File

@ -4,7 +4,7 @@
let
defaultNix = import ../default.nix;
in
{ pkgs ? defaultNix.legacyPackages, timestamp }:
{ pkgs ? defaultNix.legacyPackages }:
let
xrefcheck-x86_64-linux = defaultNix.packages.xrefcheck-static;
@ -25,14 +25,7 @@ let
paths = [ "${xrefcheck-x86_64-windows}/bin" ];
};
releaseNotes = pkgs.writeText "release-notes.md" ''
Automatic release on ${timestamp}
'';
in pkgs.linkFarm "xrefcheck-release" [
{
name = "release-notes.md";
path = releaseNotes;
}
{
name = "xrefcheck-x86_64-linux";
path = "${xrefcheck-x86_64-linux}/bin/xrefcheck";