From 5e72dabb6009ce354c05c071d0581cde2f5ffbe1 Mon Sep 17 00:00:00 2001 From: yportne Date: Wed, 1 Mar 2023 20:59:42 +0800 Subject: [PATCH 1/2] ci(upload release):upload pdf to release --- .github/workflows/main.yml | 44 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c393dc0..6f49adc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,8 +12,43 @@ on: workflow_dispatch: jobs: + dependencies: + name: Build dependencies + runs-on: ubuntu-latest + outputs: + version: ${{ steps.version.outputs.version }} + + steps: + - name: Set up Git repository + uses: actions/checkout@v2 + with: + fetch-depth: 1 + + - name: Create global variables + id: version + run: echo "::set-output name=version::$(git rev-parse --short HEAD)" + + release: + name: "Create Github tag/pre-release" + runs-on: ubuntu-latest + needs: dependencies + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Create Github pre-release (${{ needs.dependencies.outputs.version }}) + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: v${{ github.run_number }}-${{ needs.dependencies.outputs.version }} + release_name: Version ${{ github.run_number }} (${{ needs.dependencies.outputs.version }}) + draft: false + prerelease: true + build_latex: runs-on: ubuntu-latest + needs: [dependencies, release] steps: - name: Set up Git repository uses: actions/checkout@v2 @@ -30,3 +65,12 @@ jobs: name: history path: | *.pdf + - name: Upload release assets pdf + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ needs.release.outputs.upload_url }} + asset_path: history.pdf + asset_name: history.pdf + asset_content_type: application/pdf From e6844dfcaa764e224cd6c6e108ed680c673859e5 Mon Sep 17 00:00:00 2001 From: Trebor Huang <41145779+Trebor-Huang@users.noreply.github.com> Date: Thu, 2 Mar 2023 15:12:03 +0800 Subject: [PATCH 2/2] Update README accordingly --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5ffd6fe..9fd0051 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ [![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa] -**You can download the artifacts at [the actions tab](https://github.com/Trebor-Huang/history/actions)** (Login required). +**You can download the artifacts at [the releases page](https://github.com/Trebor-Huang/history/releases)**. -**你可以在[此](https://github.com/Trebor-Huang/history/actions)下载编译好的文件**(需要登录GitHub). +**你可以在[此](https://github.com/Trebor-Huang/history/releases)下载编译好的文件**. An overview of the history of type theory, mainly for mathematically oriented people. I seek to achive these goals: - Provide a coherent and up-to-date source of information in Chinese.