forked from sass/dart-sass
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
6 additions
and
278 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,8 +37,8 @@ jobs: | |
- name: Deploy | ||
run: dart run grinder pkg-github-release | ||
env: | ||
GH_TOKEN: "${{ secrets.GH_TOKEN }}" | ||
GH_USER: sassbot | ||
GH_TOKEN: "${{ github.token }}" | ||
GH_USER: "${{ github.actor }}" | ||
|
||
deploy_github: | ||
name: Deploy Github | ||
|
@@ -57,200 +57,3 @@ jobs: | |
with: | ||
files: | | ||
build-*/* | ||
deploy_npm: | ||
name: Deploy npm | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/util/initialize | ||
with: {github-token: "${{ github.token }}"} | ||
|
||
- name: Deploy | ||
run: dart run grinder pkg-npm-deploy | ||
env: | ||
UPDATE_SASS_SASS_REPO: false | ||
NPM_TOKEN: "${{ secrets.NPM_TOKEN }}" | ||
|
||
deploy_bazel: | ||
name: Deploy Bazel | ||
runs-on: ubuntu-latest | ||
needs: [deploy_npm] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/util/initialize | ||
with: {github-token: "${{ github.token }}"} | ||
|
||
- name: Deploy | ||
run: dart run grinder update-bazel | ||
env: | ||
GH_TOKEN: "${{ secrets.GH_TOKEN }}" | ||
GH_USER: sassbot | ||
|
||
deploy_pub: | ||
name: Deploy Pub | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/util/initialize | ||
with: {github-token: "${{ github.token }}"} | ||
|
||
- name: Deploy | ||
run: dart run grinder protobuf pkg-pub-deploy | ||
env: {PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}"} | ||
|
||
deploy_sass_api: | ||
name: Deploy sass_api | ||
runs-on: ubuntu-latest | ||
needs: [deploy_pub] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/util/initialize | ||
with: {github-token: "${{ github.token }}"} | ||
|
||
- name: Deploy | ||
run: dart run grinder deploy-sass-api | ||
env: | ||
PUB_CREDENTIALS: "${{ secrets.PUB_CREDENTIALS }}" | ||
GH_TOKEN: "${{ secrets.GH_TOKEN }}" | ||
GH_USER: sassbot | ||
|
||
deploy_sass_parser: | ||
name: Deploy sass-parser | ||
runs-on: ubuntu-latest | ||
needs: [deploy_npm] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GH_TOKEN }} | ||
# Set up .npmrc file to publish to npm | ||
- uses: actions/setup-node@v4 | ||
with: | ||
version: 'lts/*' | ||
check-latest: true | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
# The repo package has a file dependency, but the released version needs | ||
# a real dependency on the released version of Sass. | ||
- run: npm install sass@${{ steps.version.outputs.version }} | ||
working-directory: pkg/sass-parser/ | ||
|
||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: '${{ secrets.NPM_TOKEN }}' | ||
working-directory: pkg/sass-parser/ | ||
|
||
- name: Get version | ||
id: version | ||
run: | | ||
echo "version=$(jq .version pkg/sass-parser/package.json)" | tee --append "$GITHUB_OUTPUT" | ||
- run: git tag sass-parser/${{ steps.version.outputs.version }} | ||
- run: git push --tag | ||
|
||
deploy_homebrew: | ||
name: Deploy Homebrew | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: dart-lang/setup-dart@v1 | ||
- run: dart pub get | ||
|
||
- name: Deploy | ||
run: dart run grinder pkg-homebrew-update | ||
env: | ||
GH_TOKEN: "${{ secrets.GH_TOKEN }}" | ||
GH_USER: sassbot | ||
|
||
deploy_chocolatey: | ||
name: Deploy Chocolatey | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/util/initialize | ||
with: {github-token: "${{ github.token }}"} | ||
|
||
- name: Deploy | ||
run: dart run grinder pkg-chocolatey-deploy | ||
env: {CHOCOLATEY_TOKEN: "${{ secrets.CHOCOLATEY_TOKEN }}"} | ||
|
||
deploy_website: | ||
name: Deploy sass-lang.com | ||
runs-on: ubuntu-latest | ||
needs: [deploy_npm] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: sass/sass-site | ||
token: ${{ secrets.SASS_SITE_TOKEN }} | ||
|
||
- name: Get version | ||
id: version | ||
run: echo "version=${GITHUB_REF##*/}" | tee --append "$GITHUB_OUTPUT" | ||
|
||
- name: Wait for npm registry's CDN to catch up on replications | ||
run: sleep 600 | ||
|
||
- name: Update Dart Sass version | ||
run: npm install sass@${{ steps.version.outputs.version }} | ||
|
||
- uses: EndBug/add-and-commit@v9 | ||
with: | ||
author_name: Sass Bot | ||
author_email: [email protected] | ||
message: Cut a release for a new Dart Sass version | ||
commit: --allow-empty | ||
|
||
release_embedded_host: | ||
name: Release Embedded Host | ||
runs-on: ubuntu-latest | ||
needs: [deploy_github] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: sass/embedded-host-node | ||
token: ${{ secrets.GH_TOKEN }} | ||
|
||
- name: Get version | ||
id: version | ||
run: | | ||
echo "version=${GITHUB_REF##*/}" | tee --append "$GITHUB_OUTPUT" | ||
echo "protocol_version=$(curl -fsSL -H "Authorization: Bearer ${{ github.token }}" https://raw.githubusercontent.com/sass/sass/HEAD/spec/EMBEDDED_PROTOCOL_VERSION)" | tee --append "$GITHUB_OUTPUT" | ||
- name: Update version | ||
run: | | ||
# Update binary package versions | ||
for dir in $(ls npm); do | ||
cat "npm/$dir/package.json" | | ||
jq --arg version ${{ steps.version.outputs.version }} ' | ||
.version |= $version | ||
' > package.json.tmp && | ||
mv package.json.tmp "npm/$dir/package.json" | ||
done | ||
# Update main package version and dependencies on binary packages | ||
cat package.json | | ||
jq --arg version ${{ steps.version.outputs.version }} --arg protocol_version ${{ steps.version.outputs.protocol_version }} ' | ||
.version |= $version | | ||
."compiler-version" |= $version | | ||
."protocol-version" |= $protocol_version | | ||
.optionalDependencies = (.optionalDependencies | .[] |= $version) | ||
' > package.json.tmp && | ||
mv package.json.tmp package.json | ||
curl -fsSL -H "Authorization: Bearer ${{ github.token }}" https://raw.githubusercontent.com/sass/dart-sass/${{ steps.version.outputs.version }}/CHANGELOG.md > CHANGELOG.md | ||
shell: bash | ||
|
||
- uses: EndBug/add-and-commit@v9 | ||
with: | ||
author_name: Sass Bot | ||
author_email: [email protected] | ||
message: Update Dart Sass version and release | ||
tag: ${{ steps.version.outputs.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters