forked from adobe-fonts/adobe-variable-font-prototype
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.78 KB
/
Copy pathrelease.yml
File metadata and controls
77 lines (65 loc) · 2.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# Workflow to create a release and add associated assets
name: Release
# Triggers the workflow on push of a tag matching the specified pattern
on:
push:
tags:
- '[0-9].*'
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "do_release"
do_release:
name: Create Adobe VF Prototype Release
runs-on: ubuntu-latest
steps:
- name: Check out project
uses: actions/checkout@v1
- name: Get the tag
id: get_tag
# strip '/refs/tags/' from ref and store in VERSION
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Create Release
# N.B. this will fail if the release already exists
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.get_tag.outputs.VERSION }}
release_name: Version ${{ steps.get_tag.outputs.VERSION }}
draft: false
prerelease: true # default to pre-release; manually set to release if OK after inspection
- name: Set up Python 3.7
uses: actions/setup-python@v1
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install afdko fontmake
- name: Run build script
run: bash ./buildFont.sh
- name: Check font version string ~= tag
run: |
echo '(placeholder for future check)'
echo 'Tag: ${{ steps.get_tag.outputs.VERSION }}'
- name: Upload OTF Asset
id: upload-otf-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./RomanMasters/AdobeVFPrototype.otf
asset_name: AdobeVFPrototype.otf
asset_content_type: font/otf
- name: Upload TTF Asset
id: upload-ttf-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./RomanMasters/AdobeVFPrototype.ttf
asset_name: AdobeVFPrototype.ttf
asset_content_type: font/ttf