Skip to content

Commit

Permalink
Merge pull request #6 from yportne13/main
Browse files Browse the repository at this point in the history
把 pdf 自动上传到 release 里
  • Loading branch information
Trebor-Huang authored Mar 2, 2023
2 parents 65368f5 + e6844df commit 30855f8
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 2 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 30855f8

Please sign in to comment.