Skip to content

Commit 8218c2a

Browse files
committed
chore: Manually release.
1 parent 5b7fb06 commit 8218c2a

File tree

1 file changed

+36
-61
lines changed

1 file changed

+36
-61
lines changed

.github/workflows/release.yml

Lines changed: 36 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,8 @@ name: Release build
22

33
on:
44
push:
5-
branches:
6-
- main
7-
- develop
8-
- next
9-
workflow_dispatch:
5+
tags:
6+
- 'v2*next*'
107

118
jobs:
129
prepare:
@@ -36,68 +33,46 @@ jobs:
3633

3734
release:
3835
name: release
36+
needs: prepare
3937
runs-on: ubuntu-latest
40-
needs:
41-
prepare
4238
steps:
43-
- uses: actions/checkout@v3
44-
with:
45-
fetch-depth: 0
46-
persist-credentials: false
47-
- uses: actions/download-artifact@v3
48-
with:
49-
name: webhook
50-
path: artifacts
51-
- uses: actions/download-artifact@v3
52-
with:
53-
name: runners
54-
path: artifacts
55-
- uses: actions/download-artifact@v3
56-
with:
57-
name: runner-binaries-syncer
58-
path: artifacts
59-
60-
- name: Get installation token
61-
uses: npalm/[email protected]
62-
id: app-token
63-
with:
64-
appId: ${{ secrets.FOREST_RELEASER_APP_ID }}
65-
appPrivateKeyBase64: ${{ secrets.FOREST_RELEASER_APP_PRIVATE_KEY_BASE64 }}
66-
appInstallationType: repo
67-
appInstallationValue: ${{ github.repository }}
68-
69-
- name: Dry run release
70-
if: github.event_name != 'pull_request'
39+
- name: Checkout code
40+
uses: actions/checkout@v3
41+
- name: Create Release
42+
id: create_release
43+
uses: actions/create-release@v1
7144
env:
72-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Read only token
73-
run: |
74-
cp .release/* .
75-
yarn
76-
yarn release -d --repositoryUrl https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git
45+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
46+
with:
47+
tag_name: ${{ github.ref }}
48+
release_name: Release ${{ github.ref }}
49+
body: |
50+
Next release
51+
draft: true
52+
prerelease: false
7753

78-
- name: Release
79-
if: (github.event_name != 'pull_request' && contains('refs/heads/main', github.ref))
80-
env:
81-
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
82-
run: |
83-
cp .release/* .
84-
yarn
85-
yarn release --repositoryUrl https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git
54+
assets:
55+
name: upload assets
56+
needs: release
57+
runs-on: ubuntu-latest
8658

87-
provenance:
88-
name: Generate provenance
89-
runs-on: ubuntu-20.04
90-
needs:
91-
release
92-
if: startsWith(github.ref, 'refs/tags/')
59+
strategy:
60+
matrix:
61+
asset: ["webhook", "runner-binaries-syncer", "runners"]
9362

9463
steps:
95-
- name: Generate provenance for release
96-
uses: philips-labs/[email protected]
64+
- uses: actions/download-artifact@v3
9765
with:
98-
artifact_path: release-assets
99-
output_path: 'build.provenance'
100-
tag_name: "${{ github.ref_name }}"
101-
env:
102-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
66+
name: ${{ matrix.asset }}
67+
path: artifacts
10368

69+
- name: Upload Release Asset
70+
id: upload-release-asset
71+
uses: actions/upload-release-asset@v1
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
74+
with:
75+
upload_url: ${{ needs.release.outputs.upload_url }}
76+
asset_path: artifacts/${{ matrix.asset }}.zip
77+
asset_name: ${{ matrix.asset }}.zip
78+
asset_content_type: application/zip

0 commit comments

Comments
 (0)