Skip to content

Commit 303d231

Browse files
committed
Auto-purge after package release
1 parent 0aaff21 commit 303d231

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,29 @@ jobs:
2121
run: |
2222
echo "RUBY_VERSION=${{ github.event.client_payload.version || github.event.inputs.version }}" >> $GITHUB_ENV
2323
24+
- name: Store ABI version
25+
run: echo "ABI_VERSION=$(echo ${{ env.RUBY_VERSION }} | cut -d '.' -f 1-2)" >> $GITHUB_ENV
26+
2427
- name: Copy draft package `/tmp` to `/pub` directory
2528
run: tool/release.sh ${{ env.RUBY_VERSION }}
2629
env:
2730
AWS_ACCESS_KEY_ID: ${{ secrets.FTP_R_L_O_AWS_ACCESS_KEY_ID }}
2831
AWS_SECRET_ACCESS_KEY: ${{ secrets.FTP_R_L_O_AWS_SECRET_ACCESS_KEY }}
2932
AWS_DEFAULT_REGION: us-west-2
3033

34+
35+
- name: Purge URLs of release package
36+
run: |
37+
curl -X POST \
38+
-H "Fastly-Key: ${{ secrets.FASTLY_PURGE_TOKEN }}" \
39+
https://api.fastly.com/purge/cache.ruby-lang.org/pub/ruby/${{ env.ABI_VERSION }}/ruby-${{ env.RUBY_VERSION }}.tar.gz
40+
curl -X POST \
41+
-H "Fastly-Key: ${{ secrets.FASTLY_PURGE_TOKEN }}" \
42+
https://api.fastly.com/purge/cache.ruby-lang.org/pub/ruby/${{ env.ABI_VERSION }}/ruby-${{ env.RUBY_VERSION }}.tar.xz
43+
curl -X POST \
44+
-H "Fastly-Key: ${{ secrets.FASTLY_PURGE_TOKEN }}" \
45+
https://api.fastly.com/purge/cache.ruby-lang.org/pub/ruby/${{ env.ABI_VERSION }}/ruby-${{ env.RUBY_VERSION }}.zip
46+
3147
# TODO
3248
# - name: Create a release on GitHub
3349

0 commit comments

Comments
 (0)