mirror of
https://github.com/tobi/disktree.git
synced 2026-11-28 16:00:45 +00:00
Merge pull request #84 from armada45-pixel/perf-and-hardening
# Conflicts: # .github/workflows/release.yml # crates/disktree-app/src/marks.rs # crates/disktree-app/src/state.rs
This commit is contained in:
@@ -11,6 +11,10 @@ on:
|
||||
description: "Existing tag to (re)build, e.g. v0.9.0"
|
||||
required: true
|
||||
|
||||
# Every job uploads to the release, so every job needs to write. The token
|
||||
# reaches only the steps that name it: no checkout keeps it, and every
|
||||
# action is pinned to a commit, since a tag can be moved under a release
|
||||
# that signs with the secrets below.
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
@@ -28,6 +32,7 @@ jobs:
|
||||
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
|
||||
with:
|
||||
ref: ${{ inputs.tag || github.ref }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: Version
|
||||
id: version
|
||||
@@ -72,6 +77,7 @@ jobs:
|
||||
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
|
||||
with:
|
||||
ref: ${{ inputs.tag || github.ref }}
|
||||
persist-credentials: false
|
||||
|
||||
- name: System libraries
|
||||
run: |
|
||||
@@ -139,16 +145,15 @@ jobs:
|
||||
# MACOS_SIGN_IDENTITY "Developer ID Application: Name (TEAMID)"
|
||||
# NOTARY_KEY_P8 base64 of an App Store Connect API key
|
||||
# NOTARY_KEY_ID, NOTARY_ISSUER that key's ID and issuer
|
||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
|
||||
MACOS_SIGN_IDENTITY: ${{ secrets.MACOS_SIGN_IDENTITY }}
|
||||
NOTARY_KEY_P8: ${{ secrets.NOTARY_KEY_P8 }}
|
||||
NOTARY_KEY_ID: ${{ secrets.NOTARY_KEY_ID }}
|
||||
NOTARY_ISSUER: ${{ secrets.NOTARY_ISSUER }}
|
||||
# Only whether there is a certificate is known to the whole job. The
|
||||
# secrets themselves go to the two steps that use them, not to the
|
||||
# tests and every dependency's build script before those.
|
||||
HAS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE != '' }}
|
||||
steps:
|
||||
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
|
||||
with:
|
||||
ref: ${{ inputs.tag || github.ref }}
|
||||
persist-credentials: false
|
||||
|
||||
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
|
||||
with:
|
||||
@@ -161,7 +166,10 @@ jobs:
|
||||
|
||||
# A keychain of its own for the certificate, deleted with the runner.
|
||||
- name: Signing certificate
|
||||
if: env.MACOS_CERTIFICATE != ''
|
||||
if: env.HAS_CERTIFICATE == 'true'
|
||||
env:
|
||||
MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE }}
|
||||
MACOS_CERTIFICATE_PASSWORD: ${{ secrets.MACOS_CERTIFICATE_PASSWORD }}
|
||||
run: |
|
||||
keychain="$RUNNER_TEMP/signing.keychain-db"
|
||||
password=$(uuidgen)
|
||||
@@ -178,9 +186,14 @@ jobs:
|
||||
rm "$RUNNER_TEMP/cert.p12"
|
||||
|
||||
- name: Bundle
|
||||
env:
|
||||
MACOS_SIGN_IDENTITY: ${{ secrets.MACOS_SIGN_IDENTITY }}
|
||||
NOTARY_KEY_P8: ${{ secrets.NOTARY_KEY_P8 }}
|
||||
NOTARY_KEY_ID: ${{ secrets.NOTARY_KEY_ID }}
|
||||
NOTARY_ISSUER: ${{ secrets.NOTARY_ISSUER }}
|
||||
run: |
|
||||
args=()
|
||||
if [ -n "$MACOS_CERTIFICATE" ]; then
|
||||
if [ "$HAS_CERTIFICATE" = true ]; then
|
||||
args+=(--sign "$MACOS_SIGN_IDENTITY")
|
||||
if [ -n "$NOTARY_KEY_P8" ]; then
|
||||
echo "$NOTARY_KEY_P8" | base64 --decode \
|
||||
@@ -223,6 +236,7 @@ jobs:
|
||||
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
|
||||
with:
|
||||
ref: ${{ inputs.tag || github.ref }}
|
||||
persist-credentials: false
|
||||
|
||||
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # master
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user