Skip to content

Commit

Permalink
Refactor environment variable management and streamline build process
Browse files Browse the repository at this point in the history
- Introduced a new Env utility class to manage environment variables and flavors, replacing deprecated imports.
- Updated build commands for iOS and Android to utilize the new environment management system.
- Enhanced GitHub Actions workflows by adding steps for extracting and decoding Dotenv variables from GitHub secrets.
- Removed outdated workflows and ensured compatibility with the latest dependency versions.

These changes improve the project's structure, maintainability, and build efficiency.
  • Loading branch information
YumNumm committed Jan 17, 2025
1 parent a48f4db commit a724d5c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions scripts/app-store-connect-api-key.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { sign } from "jsonwebtoken";
import fs from "node:fs";
const env = {
keyId: "4LQFA4R675",
issuerId: "fd4cca56-716b-4f03-8e44-de72a03453db",
};
const header = {
alg: "ES256",
typ: "JWT",
kid: env.keyId,
} as const;

const jwt = sign(
{
iss: env.issuerId,
aud: "appstoreconnect-v1",
},
fs.readFileSync("AuthKey.p8"),
{
header,
algorithm: "ES256",
expiresIn: "2m",
}
);

console.log(jwt);

0 comments on commit a724d5c

Please sign in to comment.