-
-
Notifications
You must be signed in to change notification settings - Fork 307
155 lines (136 loc) · 6.13 KB
/
release.yml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
# WIP:
# Run when a release tag is pushed,
# creating the new release.
# Expects that the binaries* workflows have been completed first.
name: release
on:
push:
tags:
- '1*'
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Get artifact from the latest binaries-linux-x64 run
- name: Get latest linux binaries artifact
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # https://github.com/dawidd6/action-download-artifact v3.1.4
with:
# Optional, GitHub token, a Personal Access Token with `public_repo` scope if needed
# Required, if the artifact is from a different repo
# Required, if the repo is private a Personal Access Token with `repo` scope is needed or GitHub token in a job where the permissions `action` scope set to `read`
# github_token: ${{secrets.GITHUB_TOKEN}}
# Optional, workflow file name or ID
# If not specified, will be inferred from run_id (if run_id is specified), or will be the current workflow
workflow: binaries-linux-x64.yml
# Optional, will use specified workflow run
# use ${{ github.event.workflow_run.id }} when your action runs in a workflow_run event
# and wants to download from the triggering workflow run
# run_id: 1122334455
# If no workflow is set and workflow_search set to true, then the most recent workflow matching
# all other criteria will be looked up instead of using the current workflow
workflow_search: false
# Optional, the status or conclusion of a completed workflow to search for
# Can be one of a workflow conclusion:
# "failure", "success", "neutral", "cancelled", "skipped", "timed_out", "action_required"
# Or a workflow status:
# "completed", "in_progress", "queued"
# Use the empty string ("") to ignore status or conclusion in the search
workflow_conclusion: success
# Optional, will get head commit SHA
# pr: ${{github.event.pull_request.number}}
# Optional, no need to specify if PR is
# commit: ${{github.event.pull_request.head.sha}}
# Optional, will use the specified branch. Defaults to all branches
branch: binaries-linux-x64
# Optional, defaults to all types
event: push
# Optional, run number from the workflow
# run_number: 34
# Optional, uploaded artifact name,
# will download all artifacts if not specified
# and extract them into respective subdirectories
# https://github.com/actions/download-artifact#download-all-artifacts
# is treated as a regular expression if input name_is_regexp is true
# will download only those artifacts with a name that matches this regular expression
# https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_expressions
# name: artifact_name
# Optional, name is treated as a regular expression if set true
# name_is_regexp: true
# Optional, a directory where to extract artifact(s), defaults to the current directory
path: tmp
# Optional, defaults to current repo
# repo: ${{ github.repository }}
# Optional, check the workflow run to whether it has an artifact
# then will get the last available artifact from the previous workflow
# default false, just try to download from the last one
check_artifacts: false
# Optional, search for the last workflow run whose stored an artifact named as in `name` input
# default false
search_artifacts: false
# Optional, choose to skip unpacking the downloaded artifact(s)
# default false
skip_unpack: false
# Optional, choose how to exit the action if no artifact is found
# can be one of:
# "fail", "warn", "ignore"
# default fail
# if_no_artifact_found: fail
# Optional, allow forks when searching for artifacts
# default false
# allow_forks: false
- name: Inspect
shell: bash
run: |
ls -lF
ls -lF tmp
# - name: Make tarball
# shell: bash
# run: |
# outdir="target/${{ matrix.target }}/release"
# staging="jj-${{ github.event.release.tag_name }}-${{ matrix.target }}"
# mkdir "$staging"
# cp {README.md,LICENSE} "$staging/"
# if [ "${{ matrix.os }}" = "windows-2022" ]; then
# cp "$outdir/jj.exe" "$staging/"
# cd "$staging"
# 7z a "../$staging.zip" .
# echo "ASSET=$staging.zip" >> $GITHUB_ENV
# else
# cp "$outdir/jj" "$staging/"
# tar czf "$staging.tar.gz" -C "$staging" .
# echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
# fi
# - name: Create release
# uses: softprops/action-gh-release@69320dbe05506a9a39fc8ae11030b214ec2d1f87 # https://github.com/softprops/action-gh-release 2.0.5
# # permissions:
# # contents: write
# # https://github.com/softprops/action-gh-release?tab=readme-ov-file#-customizing
# with:
# draft: true
# body_path: ${{ github.workspace }}/doc/relnotes.github.md
# fail_on_unmatched_files: true
# # files: |
# # Release.txt
# # LICENSE
# snippets
# body: |
# ${{ fromJSON(steps.<step-id>.outputs.assets)[0].browser_download_url }}
# if you intend to run workflows on the release event (on: { release: { types: [published] } }),
# you need to use a personal access token for this action, as the default secrets.GITHUB_TOKEN does not trigger another workflow.
# - name: version
# run: echo "::set-output name=version::$(./bin/azblogfilter --version)"
# id: version
# - name: release
# uses: actions/create-release@v1
# id: create_release
# with:
# draft: false
# prerelease: false
# release_name: ${{ steps.version.outputs.version }}
# tag_name: ${{ github.ref }}
# body_path: CHANGELOG.md
# env:
# GITHUB_TOKEN: ${{ github.token }}