Skip to content

Problem: v4.2.8 is not released (#1020) #17

Problem: v4.2.8 is not released (#1020)

Problem: v4.2.8 is not released (#1020) #17

Workflow file for this run

name: release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
# pin to nix-2.13 to workaround compability issue of 2.14,
# see: https://github.com/cachix/install-nix-action/issues/161
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
nix_path: nixpkgs=channel:nixos-22.11
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v12
with:
name: crypto-com
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: build binaries
env:
NETWORK: mainnet
run: |
# install sha256sum
nix-env -i coreutils -f '<nixpkgs>'
# build binaries
./scripts/release.sh
# update checksum and upload
sha256sum *.tar.gz > "checksums.txt"
echo 'FILES<<EOF' >> $GITHUB_ENV
ls -1 *.tar.gz >> $GITHUB_ENV
echo "checksums.txt" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
cat $GITHUB_ENV
- name: upload binaries
uses: softprops/action-gh-release@v1
with:
draft: true
files: "${{ env.FILES }}"
release-macos:
# runs sequentially to avoid creating duplicated release
needs: ["release"]
runs-on: macos-latest
environment: release
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
# pin to nix-2.13 to workaround compability issue of 2.14,
# see: https://github.com/cachix/install-nix-action/issues/161
install_url: https://releases.nixos.org/nix/nix-2.13.3/install
nix_path: nixpkgs=channel:nixos-22.11
extra_nix_config: |
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
- uses: apple-actions/import-codesign-certs@v1
with:
p12-file-base64: ${{ secrets.MAC_CODE_SIGN_CERT }}
p12-password: ${{ secrets.MAC_CODE_SIGN_CERT_PASS }}
- uses: cachix/cachix-action@v12
with:
name: crypto-com
signingKey: "${{ secrets.CACHIX_SIGNING_KEY }}"
- name: build binaries
env:
MAC_CODE_API_KEY: ${{ secrets.MAC_CODE_API_KEY }}
MAC_CODE_API_KEY_ID: ${{ secrets.MAC_CODE_API_KEY_ID }}
MAC_CODE_API_ISSUER_ID: ${{ secrets.MAC_CODE_API_ISSUER_ID }}
MAC_CODE_API_DEVELOPER_ID: ${{ secrets.MAC_CODE_API_DEVELOPER_ID }}
NETWORK: mainnet
run: |
# install sha256sum
nix-env -i coreutils -f '<nixpkgs>'
# build binaries
./scripts/release.sh
# codesign
for tarball in *.tar.gz;
do
./scripts/codesign_macos.sh $tarball
mv signed.tar.gz $tarball
done
# update checksum and upload
sha256sum *.tar.gz > "checksums-darwin.txt"
echo 'FILES<<EOF' >> $GITHUB_ENV
ls -1 *.tar.gz >> $GITHUB_ENV
echo "checksums-darwin.txt" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
cat $GITHUB_ENV
- name: upload binaries
uses: softprops/action-gh-release@v1
with:
draft: true
files: "${{ env.FILES }}"