Skip to content

Commit ea54585

Browse files
authored
add a github action to release spec PDFs when a tag is pushed (#1351)
* add a github action to release spec PDFs when a tag is pushed * remove the Travis file to build and publish spec PDFs It doesn't work anymore, and it has been replaced by GitHub actions.
1 parent 5c9b590 commit ea54585

2 files changed

Lines changed: 53 additions & 40 deletions

File tree

.github/workflows/release.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: release
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
tags:
9+
- 'v*'
10+
11+
jobs:
12+
release:
13+
name: Build and Release Spec PDFs
14+
runs-on: ubuntu-latest
15+
# Refer to the build container by its SHA instead of the name, to
16+
# prevent caching problems when updating the image.
17+
# container: khronosgroup/docker-images:asciidoctor-spec.20240702
18+
container: khronosgroup/docker-images@sha256:4aab96a03ef292439c9bd0f972adfa29cdf838d0909b1cb4ec2a6d7b2d14a37f
19+
20+
permissions:
21+
contents: write
22+
23+
steps:
24+
- name: Get Spec Source
25+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26+
with:
27+
submodules: recursive
28+
# If fetch-depth: 0 is not specified, then
29+
# git describe --tags --dirty
30+
# below fails.
31+
# This could also affect SPECREVISION in the Makefile.
32+
fetch-depth: 0
33+
34+
# Ownerships in the working directory are odd.
35+
# . is owned by UID 1001, while repo files are owned by root.
36+
# This leads to many odd messages like
37+
# fatal: detected dubious ownership in repository at '/__w/OpenCL-Docs/OpenCL-Docs'
38+
# The 'git config' is a brute-force workaround.
39+
- name: Git safe directory workaround
40+
run: |
41+
git config --global --add safe.directory '*'
42+
ls -lda . .. .git Makefile
43+
44+
- name: Build Specs
45+
run: |
46+
python3 makeSpec -clean -spec core OUTDIR=out.release -j 5 api c env ext cxx4opencl
47+
48+
- name: Release Specs
49+
uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # v2.2.1
50+
with:
51+
draft: true
52+
files: |
53+
out.release/pdf/*

.travis.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)