mirror of
https://github.com/r0adkll/sign-android-release
synced 2026-09-23 13:18:38 +00:00
Merge pull request #32 from davwheat/master
Add APK and AAB signing test
This commit is contained in:
@@ -6,21 +6,52 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
release:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
name: Test action
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
name: Checkout code
|
||||
|
||||
- name: Run Tests
|
||||
- name: Run tests
|
||||
run: npm run test
|
||||
|
||||
- name: Verify Checkout
|
||||
uses: ./
|
||||
env:
|
||||
DEBUG_ACTION: true
|
||||
- uses: pCYSl5EDgo/cat@1.0.0
|
||||
name: Cat for GitHub Actions
|
||||
id: get_key
|
||||
with:
|
||||
path: __tests__/test_key_b64.txt
|
||||
|
||||
- uses: ./
|
||||
name: Sign APK
|
||||
with:
|
||||
releaseDirectory: __tests__/apk
|
||||
signingKeyBase64: ${{ steps.get_key.outputs.text }}
|
||||
alias: test_key
|
||||
keyStorePassword: android
|
||||
keyPassword: android
|
||||
|
||||
- uses: ./
|
||||
name: Sign AAB
|
||||
with:
|
||||
releaseDirectory: __tests__/aab
|
||||
signingKeyBase64: ${{ steps.get_key.outputs.text }}
|
||||
alias: test_key
|
||||
keyStorePassword: android
|
||||
keyPassword: android
|
||||
|
||||
release:
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
name: Update action
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
name: Checkout code
|
||||
|
||||
- name: Update v1 Tag
|
||||
uses: hole19/git-tag-action@master
|
||||
env:
|
||||
TAG: v1
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
__tests__/runner/*
|
||||
.vscode
|
||||
|
||||
# comment out in distribution branches
|
||||
#node_modules/
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,10 +1,12 @@
|
||||
import {Dirent} from "fs";
|
||||
import {getReleaseFile} from '../src/io-utils'
|
||||
import { Dirent } from "fs";
|
||||
import { getReleaseFile } from "../src/io-utils";
|
||||
|
||||
describe('getReleaseFile', () => {
|
||||
it('should return undefined when the given release files is an mepty array', () => expect(getReleaseFile([])).toEqual(undefined))
|
||||
it('should return the first release file', () => {
|
||||
const file = {name: 'file'} as Dirent
|
||||
expect(getReleaseFile([file])).toEqual(file)
|
||||
})
|
||||
})
|
||||
describe("getReleaseFile", () => {
|
||||
it("should return undefined when the given release files is an empty array", () =>
|
||||
expect(getReleaseFile([])).toEqual(undefined));
|
||||
|
||||
it("should return the first release file", () => {
|
||||
const file = { name: "file" } as Dirent;
|
||||
expect(getReleaseFile([file])).toEqual(file);
|
||||
});
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user