Skip to content

Commit cf7caf1

Browse files
Re-sync with internal repository (#459)
The internal and external repositories are out of sync. This Pull Request attempts to brings them back in sync by patching the GitHub repository. Please carefully review this patch. You must disable ShipIt for your project in order to merge this pull request. DO NOT IMPORT this pull request. Instead, merge it directly on GitHub using the MERGE BUTTON. Re-enable ShipIt after merging. fbshipit-source-id: f33249e69ca993e25579bfe17145829c5a0003b8 Co-authored-by: Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
1 parent d1246b0 commit cf7caf1

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

.github/workflows/TagIt.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
on:
2+
push:
3+
tags:
4+
# Only match TagIt tags, which always start with this prefix
5+
- 'v20*'
6+
7+
name: TagIt
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
permissions:
15+
contents: write # for actions/create-release to create a release
16+
name: Release
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v6
21+
- name: Archive project
22+
id: archive_project
23+
run: |
24+
FILE_NAME=${GITHUB_REPOSITORY#*/}-${GITHUB_REF##*/}
25+
git archive ${{ github.ref }} -o ${FILE_NAME}.zip
26+
git archive ${{ github.ref }} -o ${FILE_NAME}.tar.gz
27+
echo "file_name=${FILE_NAME}" >> $GITHUB_OUTPUT
28+
- name: Compute digests
29+
id: compute_digests
30+
run: |
31+
echo "tgz_256=$(openssl dgst -sha256 ${{ steps.archive_project.outputs.file_name }}.tar.gz)" >> $GITHUB_OUTPUT
32+
echo "tgz_512=$(openssl dgst -sha512 ${{ steps.archive_project.outputs.file_name }}.tar.gz)" >> $GITHUB_OUTPUT
33+
echo "zip_256=$(openssl dgst -sha256 ${{ steps.archive_project.outputs.file_name }}.zip)" >> $GITHUB_OUTPUT
34+
echo "zip_512=$(openssl dgst -sha512 ${{ steps.archive_project.outputs.file_name }}.zip)" >> $GITHUB_OUTPUT
35+
- name: Create Release
36+
id: create_release
37+
uses: actions/create-release@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
with:
41+
tag_name: ${{ github.ref }}
42+
release_name: ${{ github.ref }}
43+
body: |
44+
Automated release from TagIt
45+
<details>
46+
<summary>File Hashes</summary>
47+
<ul>
48+
<li>${{ steps.compute_digests.outputs.zip_256 }}</li>
49+
<li>${{ steps.compute_digests.outputs.zip_512 }}</li>
50+
<li>${{ steps.compute_digests.outputs.tgz_256 }}</li>
51+
<li>${{ steps.compute_digests.outputs.tgz_512 }}</li>
52+
</ul>
53+
</details>
54+
draft: false
55+
prerelease: false
56+
- name: Upload zip
57+
uses: actions/upload-release-asset@v1
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
with:
61+
upload_url: ${{ steps.create_release.outputs.upload_url }}
62+
asset_path: ./${{ steps.archive_project.outputs.file_name }}.zip
63+
asset_name: ${{ steps.archive_project.outputs.file_name }}.zip
64+
asset_content_type: application/zip
65+
- name: Upload tar.gz
66+
uses: actions/upload-release-asset@v1
67+
env:
68+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
69+
with:
70+
upload_url: ${{ steps.create_release.outputs.upload_url }}
71+
asset_path: ./${{ steps.archive_project.outputs.file_name }}.tar.gz
72+
asset_name: ${{ steps.archive_project.outputs.file_name }}.tar.gz
73+
asset_content_type: application/gzip

0 commit comments

Comments
 (0)