Skip to content

fix(release): cannot create github release (#3) #4

fix(release): cannot create github release (#3)

fix(release): cannot create github release (#3) #4

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: macos-latest
steps:
- name: Configure R2 Credentials
run: |
aws configure set aws_access_key_id ${{ secrets.R2_OOMOL_STATIC_S3_AK }}
aws configure set aws_secret_access_key ${{ secrets.R2_OOMOL_STATIC_S3_SK }}
aws configure set region auto
- name: Setup Codesign
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p action build.keychain
security default-keychain -s build.keychain
security unlock-keychain -p action build.keychain
security import certificate.p12 -k build.keychain -P $MACOS_CERTIFICATE_PWD -T /usr/bin/codesign
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k action build.keychain
env:
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_PWD }}
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Set up Goenv
run: |
brew install goenv
- name: Exec
run: |
./main.sh
env:
CODESIGN_IDENTITY: ${{ secrets.MACOS_CODESIGN_IDENTITY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get Tag Name
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Upload To R2
shell: bash
run: |
aws s3 cp \
--endpoint-url ${{ secrets.R2_OOMOL_STATIC_S3_ENDPOINT }} \
./out \
s3://oomol-static/ovm-resources/libexec/$RELEASE_VERSION \
--recursive --exclude "*" --include "*.tar.gz"
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
./out/*
body_path: ./out/sha256.txt
draft: false
prerelease: false
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}