Skip to content

Commit

Permalink
feat: setup windows codesign
Browse files Browse the repository at this point in the history
Signed-off-by: seven <[email protected]>
  • Loading branch information
Blankll committed May 27, 2024
1 parent 12f7672 commit 1ddc6cf
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 38 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: distributions release

on:
push:
branches: [master]
branches: [ master ]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -12,8 +12,8 @@ jobs:
pre-release:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [20.x]
os: [ macos-latest, ubuntu-latest, windows-latest ]
node-version: [ 20.x ]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -30,15 +30,37 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Setup .NET Core SDK
if: matrix.os == 'windows-latest'
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- run: npm ci
- run: npm run package
- name: Build app
shell: bash
run: ./scripts/make-distributions.sh
- name: Sign files with Trusted Signing
if: matrix.os == 'windows-latest'
uses: azure/[email protected]
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: https://eus.codesigning.azure.net/
trusted-signing-account-name: vscx-codesigning
certificate-profile-name: vscx-certificate-profile
files-folder: ${{ github.workspace }}\out\make
files-folder-depth: 7
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.os }}
name: artifacts-${{ matrix.os }}
path: out/make/*
release:
needs: pre-release
Expand Down Expand Up @@ -71,7 +93,6 @@ jobs:
${{ steps.changelog.outputs.compareurl }}
${{ steps.changelog.outputs.changelog }}
- name: Release App
uses: "marvinpinto/action-automatic-releases@latest"
if: steps.tag_release.outputs.successful
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

53 changes: 22 additions & 31 deletions src/views/login/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,13 @@
<div class="login-container">
<div class="login-form-content">
<h1>DocKit</h1>
<n-form
ref="loginFormRef"
:model="loginForm"
:rules="loginRules"
:show-label="false"
>
<n-form ref="loginFormRef" :model="loginForm" :rules="loginRules" :show-label="false">
<n-form-item path="name">
<n-input
v-model:value="loginForm.name"
clearable
:placeholder="$t('login.enterName')"
/>
<n-input v-model:value="loginForm.name" clearable :placeholder="$t('login.enterName')" />
</n-form-item>
<n-form-item path="password">
<n-input v-model:value="loginForm.password"
<n-input
v-model:value="loginForm.password"
type="password"
show-password-on="mousedown"
:placeholder="$t('login.enterPwd')"
Expand All @@ -35,46 +27,45 @@
</template>

<script setup lang="ts">
import { FormRules } from 'naive-ui'
import { useUserStore } from './../../store'
import { router } from './../../router';
import { useLang } from './../../lang';
import { useUserStore } from '../../store';
import { router } from '../../router';
import { useLang } from '../../lang';
const userStore = useUserStore()
const userStore = useUserStore();
const lang = useLang();
const loginFormRef = ref(null);
const loginForm = ref({
name: '',
password: '',
})
const loginRules: FormRules = ref({
});
const loginRules = ref({
name: [
{
required: true,
message: lang.t('login.enterName'),
trigger: ['input', 'blur'],
}
},
],
password: [
{
required: true,
message: lang.t('login.enterPwd'),
trigger: ['input', 'blur'],
}
]
})
},
],
});
const handleLogin = (e: MouseEvent) => {
e.preventDefault()
loginFormRef.value.validate((errors) => {
e.preventDefault();
loginFormRef.value.validate(errors => {
if (!errors) {
userStore.setToken('setToken')
router.push('/')
userStore.setToken('setToken');
router.push('/');
}
})
}
});
};
</script>

<style lang="scss" scoped>
Expand Down Expand Up @@ -103,4 +94,4 @@ const handleLogin = (e: MouseEvent) => {
}
}
}
</style>
</style>

0 comments on commit 1ddc6cf

Please sign in to comment.